-
Notifications
You must be signed in to change notification settings - Fork 27k
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
browserslist error(module not found) when run next build #33325
Comments
Hi, I could not reproduce this. I installed // package.json
"browserslist": ["extends browserslist-config-google"] And the build did not break. Could you create a minimal reproduction? |
Hello @balazsorban44,
|
I am also seeing this same issue on our repo. Difference being that the module it cannot find it scoped i.e. |
It seems this regression happened between 12.0.7 and 12.0.8. We have two Nextjs-projects with a working browserslist-extends on 12.0.7 like:
Both break when upgrading to 12.0.8. with errors like :
|
The reproduction-repo form @ale-grosselle shows the error (when you delete the package-lock.json). Pinning nextjs to 12.0.7. fixes the problem. |
Running into the same issue, also a scoped browserslist config, any workarounds besides downgrading? |
The bug seems to be introduced in this commit by switching to a precompiled version of browserslist. I replaced the compiled import |
Very nice, thanks for the quick fix 🎉 🙇 |
Awesome! Thanks for the fast work! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Run
next info
(available from version 12.0.8 and up)What version of Next.js are you using?
12.0.8
What version of Node.js are you using?
16.13.0
What browser are you using?
Chrome, Safari
What operating system are you using?
macOS
How are you deploying your application?
Other platform
Describe the Bug
12.0.7 does't have this bug, Only 12.0.8 (and canary)
Running "next build" command I received this error:
The package is properly installed:
The package.json browserlist:
Definition of browserslist-config-company/index.js
module.exports = ['cover 90% in IT', 'last 2 years', 'not dead', 'not IE 11'];
Including browserlist rules from an external file ("extends browserslist-config-company"), probably is the root cause of the problem. Hard coding the rules:
all works as expected
Expected Behavior
Including browserlist rules from an external package, it won't break the build.
To Reproduce
Simply, try to define in your package.json the browserslist attribute, including rules from an external package
The text was updated successfully, but these errors were encountered: