"npx create-next-app" is not working because npm couldn't resolve dependency peer react@"^16.6.0" of [email protected] with [email protected].
Console log there.
ryota.murakami@MacBook-Pro ~/lab> npx create-next-app
✔ What is your project named? … next.js-render-lifecycle-learning
Creating a new Next.js app in /Users/ryota.murakami/lab/next.js-render-lifecycle-learning.
Installing react, react-dom, and next using npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.6.0" from [email protected]
npm ERR! node_modules/next
npm ERR! next@"*" 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/ryota.murakami/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ryota.murakami/.npm/_logs/2020-10-24T09_12_40_212Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom next has failed.
Run bellow command.
npx create-next-app
Personally I've got resolve solution like this.
npm i -g create-next-appcreate-next-appBut npx create-next-app is showing top of the head of official getting start guide.
So npx create-next-app has unstability is not good for especially new comer.
I guess introduce stable command instead of latest one in getting started page or adding fall back solution like above is becoming better than right now.
This has been fixed with next@canary already.
@timneutkens Thank you, I'll close it.
I have same problems. how did u solve this issue?
Having the same issues. I'm using npm init next-app nextjs-blog --example "https://github.com/vercel/next-learn-starter/tree/master/learn-starter" to start the tutorial now and it worked.
Most helpful comment
This has been fixed with next@canary already.