facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.83k stars 26.88k forks source link

Error: Cannot find module 'react-scripts/scripts/init.js' #9501

Open Mihai-github opened 4 years ago

Mihai-github commented 4 years ago

When creating a brand new react app using the new way: "npx create-react-app my-app" i get the an error and seems to not be a way to fix it easy, I've found a way but I'm curios if the problem is from my pc or something else...

I hope someone can help me understand what is happening 👍

HemanthDavuluri commented 4 years ago

Can you put the errors log in here?

Mihai-github commented 4 years ago

Sure, he it it:

Error: Cannot find module 'react-scripts/scripts/init.js' Require stack:

eddiemonge commented 4 years ago

Did you get any errors when you ran the npx command? Or is this error from that?

Mihai-github commented 4 years ago

I've got this error when I'm running " npx create-react-app my-app " command... and the app is not even created it's deleted when this error appears. I do not know exacly why because I've watched the docs when create-react-app was globally and i uninstalled it with yarn and npm command

sammysmart95 commented 4 years ago

I got this same issue @Mihal-github but no way out... I tried cleaning my cache and updating my create-react-app yet no head way.. any help please...

abbasi-naim commented 4 years ago

Just run the code on git bash $ npm install $ npm install react-scripts $ npx create-react-app your-app-name

abbasi-naim commented 4 years ago

I got this same issue @Mihal-github but no way out... I tried cleaning my cache and updating my create-react-app yet no head way.. any help please...

Just run the code on git bash $ npm install $ npm install react-scripts $ npx create-react-app your-app-name

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

iamswain25 commented 3 years ago

mine was yarn 3 problem

yarn set version classic

and try again.

powerlesbian commented 3 years ago

mine was yarn 3 problem

yarn set version classic

and try again.

i tried all of these and still can't get it to run node has failed....

powerlesbian commented 3 years ago

I got this same issue @Mihal-github but no way out... I tried cleaning my cache and updating my create-react-app yet no head way.. any help please...

Just run the code on git bash $ npm install $ npm install react-scripts $ npx create-react-app your-app-name

i tried all of these and still can't get it to run node has failed.... it seems to be an issue with node_modules/react-scripts/scripts/init.js:117:13

node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module 'cra-template/package.json'

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

MehdiShojaRazavi commented 1 year ago

the same issue

Majidferidonifar commented 1 week ago

Chenge Name Folder (Not Use @#$%^&)