2
votes

I try to install Spectron, by using this command:

 npm install --save-dev spectron

but I get this Err msg:

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program
Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install" "--save-dev" "spectron"
npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! code ENOSELF

npm ERR! Refusing to install spectron as a dependency of itself npm
ERR! npm ERR! If you need help, you may report this error at: npm ERR!
https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! C:\spectron-master\npm-debug.log

What i'm doing wrong?

1
What are you setting 'name' to in your package.json? If it's "spectron", you'll get this error. "spectron-master" should be fine, though... - mgbennet
can you post package.json contents in the question - Pavan Nath

1 Answers

0
votes

If you don't set any name in the package.json by default the folder name is taken.

You can't install a Package which is same like the name in package.json.

example : trying to install Spectron in a project having the name Spectron in package.json is supposed to raise this error.