Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building url() under Dynamic Routes using Turbopack and Scss. #76267

Open
mugi-uno opened this issue Feb 20, 2025 · 0 comments
Open
Labels
CSS Related to CSS. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Comments

@mugi-uno
Copy link
Contributor

Link to the code that reproduces this issue

https://github.com/mugi-uno/next-15-turbo-and-lightningcss-sandbox

To Reproduce

Steps to Reproduce:

  1. Start the application in development mode with the --turbo option.
  2. Open the corresponding Dynamic Routes page. ( e.g. /foo )

Result:

  • The error occurs: Module not found: Can't resolve xxx

Image

Current vs. Expected behavior

Expected Behavior

Even when using Turbopack, Scss files should be built without any issues.

Current Behavior

Turbopack fails to build Scss in the following situation:

  • The build target is an Scss file.
  • The Scss file uses url() to reference resources under Dynamic Routes.

No error occurs when:

  • The --turbo option is not used.
  • The target is a CSS file instead of an Scss file.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 21.6.0
  npm: 10.2.4
  Yarn: 1.22.22
  pnpm: 9.15.0
Relevant Packages:
  next: 15.2.0-canary.66 // Latest available version is detected (15.2.0-canary.66).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack, CSS

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@github-actions github-actions bot added CSS Related to CSS. Turbopack Related to Turbopack with Next.js. labels Feb 20, 2025
@mischnic mischnic added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Related to CSS. linear: turbopack Confirmed issue that is tracked by the Turbopack team. Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants