"npx create-next-app" is not working React v17.0 reason
See original GitHub issueBug report
“npx create-next-app” is not working because npm couldn’t resolve dependency peer react@"^16.6.0"
of next@9.5.5
with react@17.0.1
.
Describe the bug
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: next.js-render-lifecycle-learning@0.1.0
npm ERR! Found: react@17.0.1
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 next@9.5.5
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.
To Reproduce
Run bellow command.
npx create-next-app
System information
- OS: macOS 10.15.7
- Version of Next.js: 9.55
- Version of Node.js: 14.13.1
Additonal context
Personally I’ve got resolve solution like this.
npm i -g create-next-app
create-next-app
But 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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >React v17.0 – React Blog
No New Features ... The React 17 release is unusual because it doesn't add any new developer-facing features. Instead, this release is primarily ......
Read more >create-next-app - npm
Create Next.js-powered React apps with one command. ... Start using create-next-app in your project by running `npm i create-next-app`.
Read more >STOP Using Create React App - YouTube
Create React App is a plague and we're here to cure it. Please use Vite, NextJS, or Remix instead. Seriously, anything is better...
Read more >Need help: npx create-react-app not working : r/reactjs - Reddit
0 ). Edit 2: I found out that this problem also happens with create-next-app :(. Please, I need help, the last two ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
First install
create-next-app
globally and withnpm i -g create-next-app
and then try doingcreate-next-app
. This fixed it for me. 😃This has been fixed with next@canary already.