Reputation: 21
I am not able to create a project using create-react-app, I get the error "Module not found".
Node version is 17.0.1 and Npm version is 8.1.1
I have reinstalled nodejs 3 times now and have tried different commands like
npm install create-react-app -g
npm cache clean --force
P.S - I have updated the nodejs to 17.0.1 as the picture version shows 16.13.0
Upvotes: 0
Views: 928
Reputation: 21
So after almost 3-4 hours of trying different things, it has worked. I dont know which particular thing would have helped it to work but following are the things I tried -
npm fix
npm fix --force
Upvotes: 1
Reputation: 3359
You can try with npx create-react-app my-app
.
Visit for more details create-react-app
To create a new app, you may choose one of the following methods:
npx
npx create-react-app my-app
npm
npm init react-app my-app
npm init <initializer>
is available in npm 6+
Yarn
yarn create react-app my-app
yarn create
is available in Yarn 0.25+
Upvotes: 2