Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0` failed

This worked out in my case. Beforew creating the app first run this:

npm config set legacy-peer-deps true

Then run:

npx create-react-app my-app

Explanation:
The --legacy-peer-deps flag was introduced with v7 as a way to bypass 
peerDependency auto-installation; it tells NPM to ignore peer dependencies 
and proceed with the installation anyway. This is how things used to be with
NPM v4 through v6.
 
PREVIOUS NEXT
Tagged: #npm #install #failed
ADD COMMENT
Topic
Name
2+9 =