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

Critical bug / breaking change on 14.1.0 preventing update from latest stable 14.0.4 #61002

Closed
bluelakee02 opened this issue Jan 22, 2024 · 7 comments
Labels
bug Issue was opened via the bug report template. locked

Comments

@bluelakee02
Copy link

bluelakee02 commented Jan 22, 2024

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/cranky-cache-2zw2zw

To Reproduce

Open the codesanbox link, you will see it won't start the dev server

Current vs. Expected behavior

And I know why, valid browserlist config which worked on previous stable version, breaks current version. It looks like you cannot have specified browsers for development environment. I am reporting this maily because it is very hard to debug and this breaking change is not mentioned anywhere. Also it is not clear for which browsers is dev build is optimized.
Expected behavior - to not crash or announce it as breaking change or mention in docs

Provide environment information

Everywhere

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

I think, that some opened issues are also caused by this - because in terminal, you will get errors from third party React libraries, so people might report this as an issue concerning v14.1.0 and specific library.

@bluelakee02 bluelakee02 added the bug Issue was opened via the bug report template. label Jan 22, 2024
@williamli
Copy link
Contributor

williamli commented Jan 23, 2024

It looks like it is an issue with using Node v20 on Codesandbox.

I have created a repo at https://github.com/vercel-support/gh-61002-nextjs-nodev20 and ran it on my local dev environment without any issue (using Node 20).

Here is the CodeSandbox I am using. Everything seems good as well.
https://codesandbox.io/p/github/vercel-support/gh-61002-nextjs-nodev20/

CleanShot 2024-01-23 at 14 45 38

@bluelakee02
Copy link
Author

bluelakee02 commented Jan 23, 2024

Well, in your codesanbox you do not have browserlist defined in package json, did you read the text of the issue?

In Nextjs you are defining browserlist config in package.json. In the documentation there is a section about it. The problem is that a valid browserlist configuration which worked in previous stable version, that is 14.0.4, breaks the 14.1.0 version and breaks it so that the app crashes. @williamli

@alessandrojcm
Copy link

Yeah there are a couple of related issues #60890 and #60909, honestly shocking that a minor version breaks this so badly by just using a feature that is prominently featured in the docs.

@bluelakee02
Copy link
Author

@williamli any progress on reproducing?

@steowens
Copy link

steowens commented Feb 14, 2024

Yea my project is completely broken now thanks to this update, and I don't even know how to begin to fix it. Next JS is a horrible framework. Way too many rogue dependencies. IN my case the issue is that Webpack is broken due to a dependency which uses a dependency which uses a dependency which uses a dependency which uses the fs module which has been pulled because it has a security vulnerability. It's all just one big ball of dependency spaghetti. I really like Golang better.
Dependency tree that breaks:
webpack -> define-env-plugin -> terser-webpack-plugin

Thing is that Webpack 5 says that it includes the latest terser-webpack-plugin, so you shouldn't need it to be in your node-modules but when you examine the webpack module 'next/dist/build/webpack/plugins/terser-webpack-plugin' doesn't exist.

./node_modules/next/dist/compiled/webpack/bundle5.js
Module not found: Can't resolve 'next/dist/build/webpack/plugins/terser-webpack-plugin'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/next/dist/compiled/webpack/webpack.js
./node_modules/next/dist/build/webpack/plugins/define-env-plugin.js
./node_modules/next/dist/build/swc/index.js
./src/components/Common/BoatPages.jsx
./src/components/Home/BoatPicker.jsx
./src/components/Home/LandingPreview.jsx

@styfle
Copy link
Member

styfle commented Mar 18, 2024

@bluelakee02 The codesandbox is 404 https://codesandbox.io/p/devbox/cranky-cache-2zw2zw

image

I'm going to close this since there are no longer steps to reproduce and I'm pretty sure this was already fixed in PR #61791

Please try updating to the latest version of Next.js with npm install next@latest

If that doesn't work, please create a new issue with the steps to reproduce, thanks!

@styfle styfle closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Copy link
Contributor

github-actions bot commented Apr 2, 2024

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.

@github-actions github-actions bot added the locked label Apr 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

No branches or pull requests

5 participants