Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh: react-scripts: command not found #6594

Closed
robertlee903 opened this issue Mar 7, 2019 · 11 comments
Closed

sh: react-scripts: command not found #6594

robertlee903 opened this issue Mar 7, 2019 · 11 comments

Comments

@robertlee903
Copy link

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

@robertlee903
Copy link
Author

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

@micalgenus
Copy link

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. 😄

@robertlee903
Copy link
Author

robertlee903 commented Mar 7, 2019

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?

@micalgenus
Copy link

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

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

@robertlee903
Copy link
Author

robertlee903 commented Mar 7, 2019

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

@micalgenus
Copy link

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.

@robertlee903
Copy link
Author

robertlee903 commented Mar 7, 2019

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.

@micalgenus
Copy link

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.

@robertlee903
Copy link
Author

Thank you!

@micalgenus
Copy link

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

@robertlee903
Copy link
Author

okay

@lock lock bot locked and limited conversation to collaborators Mar 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants