2

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?

mgbennet
  • 612
  • 7
  • 16

1 Answers1

0

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.

Bharath Kumar S
  • 1,332
  • 2
  • 8
  • 25