Linisha Siriwardana
Linisha Siriwardana

Reputation: 111

npm ERR! code ENOSELF while installing react dependencies

when I try to install dependencies using 'npm install react react-dom prop-types --save-dev' to the react (in webstorm) it shows an error 'npm ERR! code ENOSELF'.

it did work correctly before so i tried 2 3 times creating new projects

npm install react react-dom prop-types --save-dev

npm install react react-dom prop-types --save-dev should install all the dependencies but it shows an error

Upvotes: 0

Views: 2026

Answers (2)

Md Hasnain
Md Hasnain

Reputation: 11

For this error,

  1. make sure that the project name and package name should not be the same.
  2. or just rename the package name property in my package.json in the branch...

Upvotes: 1

dipenparmar12
dipenparmar12

Reputation: 3455

rename your project directory to something else.... then execute below command

npm audit fix

or

npm audit fix --force 

Upvotes: 0

Related Questions