拒绝将“模块"安装为自身的依赖项 [英] Refusing to install 'module' as a dependency of itself

查看:45
本文介绍了拒绝将“模块"安装为自身的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在玩 gulp 教程时遇到了这个错误

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

Refusing to install gulp as a dependency of itself

执行时

npm install --save-dev gulp

可能是什么问题?

推荐答案

问题出在我自己的应用程序名称上.

The problem was in the name of my own application.

在package.json中,我不小心把它命名为gulp

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.

这篇关于拒绝将“模块"安装为自身的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆