Node.js 尝试安装npm包导致EEXIST错误

Node.js 尝试安装npm包导致EEXIST错误,node.js,npm,gulp,zurb-foundation,lightgallery,Node.js,Npm,Gulp,Zurb Foundation,Lightgallery,在一个项目中,我试图添加为npm包 但它不会安装,导致有关Gulp的错误: ➜ foundation-6.4.3 npm i lightgallery npm ERR! path [thePathTo]/foundation-6.4.3/node_modules/.bin/gulp npm ERR! code EEXIST npm ERR! Refusing to delete [thePathTo]/foundation-6.4.3/node_modules/.bin/gulp: is ou

在一个项目中,我试图添加为npm包

但它不会安装,导致有关Gulp的错误:

➜  foundation-6.4.3 npm i lightgallery
npm ERR! path [thePathTo]/foundation-6.4.3/node_modules/.bin/gulp
npm ERR! code EEXIST
npm ERR! Refusing to delete [thePathTo]/foundation-6.4.3/node_modules/.bin/gulp: is outside [thePathTo]/foundation-6.4.3/node_modules/gulp and not a link
npm ERR! File exists: [thePathTo]/foundation-6.4.3/node_modules/.bin/gulp
npm ERR! Move it away, and try again.
我曾试图删除该文件,将其移开等,但结果几乎相同的错误,声明
[thePathTo]/foundation-6.4.3/node_modules/yargs/node_modules/.bin/窗口大小
应该被移动

如果我删除
node_modules
文件夹并运行
npm install
我会得到一个新的
node_modules
文件夹,但是使用我全局拥有的节点包(354个文件夹),而不是
package.json
中列出的包(36个文件夹)

npm版本:6.3.0

节点版本:v8.5.0

GulpCLI版本1.3.0–本地版本4.0.0-alpha.3


有人能帮我找出我的设置有什么问题吗?

node_模块中的文件夹比package.json中指定的36个文件夹多的原因是这些包具有所需的依赖项。这将导致安装其他软件包以支持您请求的软件包。确认您指定了适当的版本,并且它与您的NPM、Node和Gulp版本一起工作。您可以在包的NPM页面上查看此信息。请提供有关NPM版本的一些信息。这似乎只与npm有关。感谢您抽出时间。我已经在我的问题中提供了版本信息。我真的很难解决这个问题@DanielRuf你能帮忙吗?到目前为止所需软件包的安装工作正常吗?如果是的话,一切都应该很好。