Reputation: 3279
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
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
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