4

In a Foundation for sites project im trying to add Lightgallery as an npm package.

But it will not install, resulting in this error about 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.

I have tried to delete the file, move it away etc. but it result an almost identically error, stating that [thePathTo]/foundation-6.4.3/node_modules/yargs/node_modules/.bin/window-size should be moved.

If I delete the node_modules folder and runs npm install I get a new node_modules folder, but with the node packages I have globally (354 folders) instead of the packages listed in package.json (36 folders)

npm version: 6.3.0

node version: v8.5.0

Gulp CLI version 1.3.0 – Local version 4.0.0-alpha.3

Can someone please help me figure out what is wrong with my setup?

Crave
  • 175
  • 3
  • 14
  • the reason for having more folders in node_modules than the 36 specified in the package.json is that these packages have dependencies that they require. This results in additional packages being installed to support the packages you requested. Confirm you have the appropriate versions specified and that it works with your versions of NPM, Node, and Gulp. You can view this on the NPM page for the package. – TeoAlmonte Aug 15 '18 at 15:51
  • Please provide some info about the npm version. This seems to be only related to npm. –  Aug 16 '18 at 04:28
  • Thank you for your time. I have provided the version info in my question. – Crave Aug 16 '18 at 07:36
  • I'm really struggling with this problem. @DanielRuf can you help? – Crave Aug 24 '18 at 06:26
  • Did the install of the needed package work so far? If yes, everything should be fine. –  Aug 24 '18 at 10:01

0 Answers0