-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
Trivial .babelrc breaks <Image> component #61116
Labels
Comments
This works with nextjs 14.0.1 and breaks with 14.1.0 |
Same issue with Nextjs 14.1.0 |
I'm getting this issue as well when trying to use 14.1.0, does not happen with 14.0.4. |
styfle
added a commit
that referenced
this issue
Feb 8, 2024
### Why The `process/browser` lib was imported and being transformed, but `process.browser = true` turns to `true = true` that causes the compilation error, we need to exclude them from certain compilation layers ### What - Fixes #61116 Closes NEXT-2410 Closes NEXT-2328 --------- Co-authored-by: Jiachi Liu <[email protected]>
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
styfle
added a commit
that referenced
this issue
Feb 28, 2024
The `process/browser` lib was imported and being transformed, but `process.browser = true` turns to `true = true` that causes the compilation error, we need to exclude them from certain compilation layers - Fixes #61116 Closes NEXT-2410 Closes NEXT-2328 --------- Co-authored-by: Jiachi Liu <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Link to the code that reproduces this issue
https://github.com/igorkofman/next-babel-repro
To Reproduce
Current vs. Expected behavior
igor@MacBook-Air-3 my-app % npm run dev
▲ Next.js 14.1.1-canary.10
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
✓ Ready in 1033ms
Using external babel configuration from /Users/igor/src/my-app/.babelrc
⚠ It looks like there is a custom Babel configuration that can be removed.
⨯ ../../node_modules/process/browser.js
TypeError: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "BooleanLiteral"
Import trace for requested module:
../../node_modules/process/browser.js
./node_modules/next/dist/compiled/picomatch/index.js
./node_modules/next/dist/shared/lib/match-remote-pattern.js
./node_modules/next/dist/shared/lib/image-loader.js
./node_modules/next/dist/client/image-component.js
○ Compiling / ...
⨯ ../../node_modules/process/browser.js
TypeError: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "BooleanLiteral"
Import trace for requested module:
../../node_modules/process/browser.js
./node_modules/next/dist/compiled/picomatch/index.js
./node_modules/next/dist/shared/lib/match-remote-pattern.js
./node_modules/next/dist/shared/lib/image-loader.js
./node_modules/next/dist/client/image-component.js
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 Binaries: Node: 20.8.0 npm: 10.2.5 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 14.1.1-canary.10 // Latest available version is detected (14.1.1-canary.10). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Adding trivial .babelrc with just nextjs presets breaks the
component.
NEXT-2328
The text was updated successfully, but these errors were encountered: