0

This is what I'm getting

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

5
  • Did you follow the instructions on create-react-app.dev/docs/getting-started ? They recommend not installing globally, but use npx . Also, you have to create an app using create-react-app my-cool-app Commented Oct 28, 2021 at 9:20
  • Yeah I did the same, uninstalled the create-react-app globally then tried with npx but its still showing error. Commented Oct 28, 2021 at 9:45
  • Maybe it has something to do with your install location. You create the app on desktop, but it's looking in a different folder for the module. As far as I understand, when you work locally (instead of having global installs), everything has to exist inside the same folder. Commented Oct 28, 2021 at 9:51
  • You might need to uninstall the global variant first using npm uninstall create-react-app -g Commented Oct 28, 2021 at 9:52
  • Did it. Still getting the same issue :( Commented Oct 28, 2021 at 9:57

2 Answers 2

2

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+

Sign up to request clarification or add additional context in comments.

1 Comment

Still getting the same error. "Module not found". Stuck at this for 2-3 hours :(
1

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 -

  • Delete npm and npm cache folder.
  • Reinstall the nodejs (LTS version).
  • Create the app in another folder.
  • Used power shell instead of CMD.
  • npm fix
  • npm fix --force

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.