1

I uninstalled react-scripts trying to fix bug in terminal earlier. Now when I run npm install react-scripts it gives me this:


Cole@Coles-MacBook-Pro-4 client % npm i react-scripts
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 1881 packages, changed 1 package, and audited 1986 packages in 58s

138 packages are looking for funding
  run `npm fund` for details

87 vulnerabilities (81 moderate, 6 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

But when I run npm uninstall react-scripts it gives me this:

Cole@Coles-MacBook-Pro-4 client % npm uninstall react-scripts

removed 1882 packages, and audited 104 packages in 15s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Obviously I do need react-scripts so I can start my project up in development. When I run npm start with react-scripts uninstalled, it gives me sh: react-scripts: command not found

How can I install react-scripts without causing vulnerabilities?

Edit: When I try npm audit fix it gives me this nasty message:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: [email protected]
npm ERR! node_modules/type-fest
npm ERR!   type-fest@"^0.21.3" from [email protected]
npm ERR!   node_modules/ansi-escapes
npm ERR!     ansi-escapes@"^4.2.1" from @jest/[email protected]
npm ERR!     node_modules/@jest/core
npm ERR!       @jest/core@"^26.6.0" from [email protected]
npm ERR!       node_modules/jest
npm ERR!         peer jest@"^26.0.0" from [email protected]
npm ERR!         node_modules/jest-watch-typeahead
npm ERR!         1 more (react-scripts)
npm ERR!       1 more (jest-cli)
npm ERR!     ansi-escapes@"^4.3.1" from [email protected]
npm ERR!     node_modules/jest-watch-typeahead
npm ERR!       jest-watch-typeahead@"0.6.1" from [email protected]
npm ERR!       node_modules/react-scripts
npm ERR!         react-scripts@"^4.0.3" from the root project
npm ERR!     2 more (jest-watcher, terminal-link)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional type-fest@"^0.13.1" from @pmmmwh/[email protected]
npm ERR! node_modules/@pmmmwh/react-refresh-webpack-plugin
npm ERR!   @pmmmwh/react-refresh-webpack-plugin@"0.4.3" from [email protected]
npm ERR!   node_modules/react-scripts
npm ERR!     react-scripts@"^4.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/Cole/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Cole/.npm/_logs/2021-05-26T13_04_40_793Z-debug.log

Maybe I have to uninstall and reinstall the entire create-react-app package? I started a different project in a different folder and it still had the same problems right after entering npx create-react-app <name>. Sounds like my whole computer is messed up now.

1 Answer 1

1

How can I install react-scripts without causing vulnerabilities?

You can't. You have to wait for the author (in this case, Facebook) to update its dependencies to remove vulnerabilities.

Sign up to request clarification or add additional context in comments.

1 Comment

^ you can also look at the audit list and see what the vulnerabilities really are and be aware of them. Most of them might not even be relevant to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.