Skip to content

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

Closed
@RobFosterNYC

Description

@RobFosterNYC

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 :)

Activity

pierre-H

pierre-H commented on Jun 15, 2021

@pierre-H

See #11092

RobFosterNYC

RobFosterNYC commented on Jun 15, 2021

@RobFosterNYC
Author

Thank you @pierre-H <3

cmacdonnacha

cmacdonnacha commented on Jun 15, 2021

@cmacdonnacha

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

KrishnanSriram

KrishnanSriram commented on Jun 15, 2021

@KrishnanSriram

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

cmacdonnacha

cmacdonnacha commented on Jun 16, 2021

@cmacdonnacha

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

gaearon commented on Jul 2, 2021

@gaearon
Contributor

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.

locked as resolved and limited conversation to collaborators on Jul 2, 2021
gaearon

gaearon commented on Jul 2, 2021

@gaearon
Contributor

Please see #11174.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gaearon@KrishnanSriram@pierre-H@cmacdonnacha@RobFosterNYC

        Issue actions

          Using npx create-react-app causes vulnerabilities, Why? · Issue #11109 · facebook/create-react-app