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

Using npx create-react-app causes vulnerabilities, Why? #11109

Closed
RobFosterNYC opened this issue Jun 15, 2021 · 7 comments
Closed

Using npx create-react-app causes vulnerabilities, Why? #11109

RobFosterNYC opened this issue Jun 15, 2021 · 7 comments

Comments

@RobFosterNYC
Copy link

RobFosterNYC commented Jun 15, 2021

Hi, I am learning react and when I use whats called new method ( npx install -g create-react-app (then name of app))
instead of using (npm install -g create-react-app).
I was following a website that said to stop using it one way and to start using the npx version way.
I uninstalled react by using ( npm uninstall -g create-react-app ) then I used ( npx install -g create-react-app (then name of app))
I get an ERR message saying I have vulnerabilities. As shown in the picture below.

I am using NODE v16.3.0, npm v7.16.0

I was following THIS page....
.
Screenshot_13

And THIS is the ERR I got back when following the website.....
.
Screenshot_10B

.

    • How do I solve this problem ??
    • Also how do I install react globally so I can use it in all my upcoming projects as Im learning react ??

Thanks for reading :)

@pierre-H
Copy link

See #11092

@RobFosterNYC
Copy link
Author

Thank you @pierre-H <3

@cmacdonnacha
Copy link

This is becoming a big issue and there's been no communication from the team on this.

@KrishnanSriram
Copy link

react-scripts is the problem-maker
96 vulnerabilities (85 moderate, 11 high)
All our production release are now stopped

@cmacdonnacha
Copy link

Is there a way for us to update these dependencies ourselves without having to wait for react-scripts? There's currently a high sev vulnerability on normalize-url

@gaearon
Copy link
Contributor

gaearon commented Jul 2, 2021

These warnings are false positives. There are no actual vulnerabilities affecting your app here.

To fix npm audit warnings, move react-scripts from dependencies to devDependencies in your package.json.

That will remove the false positive warnings.

I agree with the point in #11102 and will make this change so that new projects don't keep having these false positive warnings.

If you want to discuss this, please comment in #11102.

@gaearon gaearon closed this as completed Jul 2, 2021
@facebook facebook locked as resolved and limited conversation to collaborators Jul 2, 2021
@gaearon
Copy link
Contributor

gaearon commented Jul 2, 2021

Please see #11174.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants