vercel/turborepo

Unexpected token Delim('$') at [project]/app/globals.css:757:29

Closed this issue · 1 comments

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/J4v4Scr1pt/ThnJK/tree/upgradeToNextjs15andReact19

Which canary version will you have in your reproduction?

Nextjs 15

Enviroment information

I use NextJs 15

Expected behavior

To work as with webpack.

Actual behavior

Fails as soon as Turbo is trying to compile a page you navigate to.

To Reproduce

Add --turbopack in the dev command in package.json and start the project.
image

Navigate to any page and the error will appear.

Additional context

I'm using latest NextJs version and do not point to any specific Turbo version.

I have some custom Tailwind configuration that used to work with Nextjs and webpack. But with NextJs 15 and turbo being stable I wanted to use this. But then I get this error:
image

 ⨯ ./app/globals.css:758:30
Parsing css source code failed
  756 |   --background: ({ opacityVariable, opacityValue }) => {
  757 |           if (!isNaN(+opacityValue)) {
> 758 |             return `hsl(var(${nextuiColorVariable}) / ${opacityValue})`;
      |                              ^
  759 |           }
  760 |           if (opacityVariable) {
  761 |             return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, var(${opacityVariable})))`;

Unexpected token Delim('$') at [project]/app/globals.css:757:29

I can only fix the issue by removing the method or using webpack, which is not what I want :).

Same problem as in this thread that is closed: #2356.
Last post encourage you start a new thread and not continue the current.

Turbopack has moved to vercel/next.js, please open an issue there.