create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

sh: react-scripts: command not found

Open uplancera opened this issue 7 years ago • 11 comments

screen shot 2019-03-07 at 10 07 30 am

uplancera avatar Mar 07 '19 18:03 uplancera

screen shot 2019-03-07 at 10 34 28 am

uplancera avatar Mar 07 '19 18:03 uplancera

Do run PATH=$PATH:./node_modules/.bin npm start.

Install the package in the global npm install -g react-scripts or yarn global react-scripts. Then, it can be executed without setting environment (PATH=$PATH:...).

I do not know if this is the answer you want. :smile:

micalgenus avatar Mar 07 '19 18:03 micalgenus

I have fixed it with your answer. I appreciate your help.

it appears

run npm audit fixto fix them, ornpm audit` for details

whenever npm install Could you tell me the answer to this problem?

uplancera avatar Mar 07 '19 19:03 uplancera

@wmgstar Sorry.. I don't understand your question.

Can I tell you easily because I am not good at English?

micalgenus avatar Mar 07 '19 19:03 micalgenus

screen shot 2019-03-07 at 11 32 50 am

It appears this problem whenever I run npm install each projects.

screen shot 2019-03-07 at 11 37 58 am

uplancera avatar Mar 07 '19 19:03 uplancera

https://docs.npmjs.com/cli/audit

Scan your project for vulnerabilities and automatically install any compatible updates to vulnerable dependencies

I recommend using the `npm audit fix 'to fix the vulnerability.

micalgenus avatar Mar 07 '19 19:03 micalgenus

I ran the following commands.

npx create-react-app my-app
cd my-app
rm -rf node_modules
npm install

Then this warning appears. run npm audit fixto fix them, ornpm audit for details I don't think there is any vulnerability.

uplancera avatar Mar 07 '19 19:03 uplancera

I use yarn instead of npm, and I do not have this problem. I recommend using a yarn.

npm install -g yarn
npx create-react-app my-app
cd my-app
rm -rf node_modules
yarn install

Usage is similar to npm.

micalgenus avatar Mar 07 '19 20:03 micalgenus

Thank you!

uplancera avatar Mar 07 '19 20:03 uplancera

If all of the necessary parts are resolved, you may close the issue. :smile:

micalgenus avatar Mar 07 '19 20:03 micalgenus

okay

uplancera avatar Mar 07 '19 20:03 uplancera