-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Open
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.
Description
Link to the code that reproduces this issue
https://github.com/payloadcms/payload/tree/turbo-bug-reproduction-2
To Reproduce
cd project
pnpm i
pnpm next dev --turbo
- Open localhost:3000
You will see the following in your browser:
and in your terminal:
Current vs. Expected behavior
On Webpack, the styles.scss
file which is outside the project
folder is imported correctly by scss. On Turbopack, this will throw the following error: "Error: An unexpected Turbopack error occurred. Please see the output of
next dev for more details."
I see the following problems:
- Inconsistency between Turbopack and Webpack. While it might be reasonable to disallow importing files from outside the project folder, I think inconsistencies between Turbopack and Webpack should be minimized
- There is no proper error message.
- The error message indicates that
next dev
would provide more details, but it does not.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6031
Available memory (MB): 65536
Available CPU cores: 16
Binaries:
Node: 22.13.1
npm: 10.9.2
Yarn: 1.22.22
pnpm: 9.15.5
Relevant Packages:
next: 15.2.2-canary.6 // Latest available version is detected (15.2.2-canary.6).
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
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
Athelian
Metadata
Metadata
Assignees
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.