next-safe
next-safe copied to clipboard
[BUG]: Could not install next-safe when nextjs version is 12.
Describe the bug
I just installed the latest nextjs (12.0.10) and trying to install next-safe and got error that it could not resolve dependency. Is the latest next-safe not compatible with the latest nextjs?
% npm i next-safe
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: me-mini-sites@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/next
npm ERR! next@"^12.0.10" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^9.5.0 || ^10.2.1 || ^11.1.0" from [email protected]
npm ERR! node_modules/next-safe
npm ERR! next-safe@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/eptalampas/.npm/eresolve-report.txt for a full report.
Version
v3.x.x
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Github actions started hiccupping on this for me. Possibly because I recently started running against node 16 (since AWS lambdas now support node 16). Succeeds on rerun.
I can confirm that this is happening for me too on Next.js 12, Node.js 16. Happy to put a PR in to add Next.js 12 as a peer dependency in package.json
. Any doc I can have a look at for how to test, don't think there is anything on the new version that would cause the library to break.
"peerDependencies": {
https://github.com/vercel/next.js: "^9.5.0 || ^10.2.1 || ^11.1.0"
},
Hey! can we include Next12 as dependency? Failing build on Node16 in past days (no changes to versions, just started failing).
Added the PR as per the mention above - https://github.com/trezy/next-safe/pull/45. We won't be revisiting this on our side but hopefully helps those that need it right now :)
Fixed by #45
I have this exact same problem but with Next 13.1.1. Should I open a new issue for this?
I know this has been closed but put the PR referenced above to address the issue @Cirelion 👍 Should work once it gets merged :)