4

站点项目的基础中,我试图将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 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/window-size 应该移动该文件。

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

npm 版本:6.3.0

节点版本:v8.5.0

Gulp CLI 版本 1.3.0 – 本地版本 4.0.0-alpha.3

有人可以帮我弄清楚我的设置有什么问题吗?

4

0 回答 0