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

Dev build broken with Turbopack and Next.js 15 latest #4395

Closed
fungilation opened this issue Dec 4, 2024 · 1 comment · Fixed by #4396
Closed

Dev build broken with Turbopack and Next.js 15 latest #4395

fungilation opened this issue Dec 4, 2024 · 1 comment · Fixed by #4396
Labels

Comments

@fungilation
Copy link
Contributor

What is the problem?

with Next 15.0.3, blitz dev --turbo:

image

the error log is misleading (maybe) with the imports in node_modules/blitz/dist/chunks/index-browser.mjs, as the culprit is The export default was not found in module [project]/node_modules/.blitz/turbopack-empty.js [client] (ecmascript).

bisecting which Next version broke this, it started with 15.0.0-rc.1. 15.0.0-rc.0 and 14.x worked fine in dev --turbo

Paste all your error logs here:

with Next 15.0.3, dev --turbo:

image

with Next 15.0.0-rc.0, dev --turbo:

image

Paste all relevant code snippets here:

N/A

What are detailed steps to reproduce this?

  1. blitz dev --turbo with different Next versions
  2. also tested different Blitz versions, isn't a factor. Both 2.0.10 and 2.1.3 lead to same error

Run blitz -v and paste the output here:

macOS Unknown | darwin-x64 | Node: v23.3.0

blitz: 0.45.5 (global)
blitz: 2.1.3 (local)

  Package manager: npm
  System:
    OS: macOS 14.7.1
    CPU: (8) x64 Apple M1
    Memory: 83.97 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.3.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.9.0 - /usr/local/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: Not Found
    blitz: 2.1.3 => 2.1.3
    prisma: Not Found
    react: 19.0.0-rc-66855b96-20241106 => 19.0.0-rc-66855b96-20241106
    react-dom: 19.0.0-rc-66855b96-20241106 => 19.0.0-rc-66855b96-20241106
    typescript: ~5.4.5 => 5.4.5

Please include below any other applicable logs and screenshots that show your problem:

No response

@mischnic
Copy link

mischnic commented Dec 6, 2024

vercel/next.js#73503 (comment):

This is caused by that [project]/node_modules/.blitz/turbopack-empty.js file. So it's not a Turbopack issue but a blitz one.

Turbopack correctly detects that you are trying to import the default export of a file containing export {}. Which would never work.

They should instead try to do module.exports = {} in that file (or something like that using CommonJS), because that can't be statically analyzed.

fungilation added a commit to fungilation/blitz that referenced this issue Dec 6, 2024
@kodiakhq kodiakhq bot closed this as completed in #4396 Dec 7, 2024
kodiakhq bot pushed a commit that referenced this issue Dec 7, 2024
* Update turbopack-empty.js

fix #4395

* Create brown-cobras-dream.md

---------

Co-authored-by: Siddharth Suresh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants