Roman Mik
Roman Mik

Reputation: 3279

Refusing to install 'module' as a dependency of itself

Recently, I was playing with a gulp tutorial and had this error

Refusing to install gulp as a dependency of itself

when executing

npm install --save-dev gulp

what could be the issue?

Upvotes: 3

Views: 2945

Answers (2)

this is yash
this is yash

Reputation: 533

This error occurs when you are trying to install the package from the path (or in the folder) in which you had created the package..
Just navigate to some other folder or path and then try to install the package
It should work.

Upvotes: 2

Roman Mik
Roman Mik

Reputation: 3279

The problem was in the name of my own application.

In package.json, I accidently named it gulp

{
   "name": "gulp",
   "version": "1.0.0",
   "description": "tutorial",
   "main": "index.js",
   "scripts": {
   "test": "echo \"Error: no test specified\" && exit 1"
},
"author": "rmv",
"license": "ISC",
"devDependencies": {}
}

Make sure your app is not called as one of the dependencies you will be using.

Upvotes: 3

Related Questions