-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.locked
Description
Link to the code that reproduces this issue
https://github.com/nctay/NextJS-canary-require-issue
To Reproduce
- Start dev with --turbo
- Get error ReferenceError: require is not defined
Current vs. Expected behavior
Current behavior:
Getting error ReferenceError: require is not defined
Expected behavior:
No errors
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 20.14.0
npm: 10.7.0
Yarn: N/A
pnpm: 9.4.0
Relevant Packages:
next: 15.0.0-canary.157 // Latest available version is detected (15.0.0-canary.157).
eslint-config-next: 14.2.11
react: 19.0.0-rc-206df66e-20240912
react-dom: 19.0.0-rc-206df66e-20240912
typescript: 5.6.2
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
i tested my reproduction against different canary releaases, the first one than introduced the bug was "15.0.0-canary.150", since reverting to "15.0.0-canary.149" works.
Last version of next-typesafe-url 4.1.0 published long ago. Seems like there is an issue with bundling server code to user since canary v150.
No errors using next dev without turbo.
Metadata
Metadata
Assignees
Labels
TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.locked