JeremyEnglert / JointsWP

A blank WordPress theme built with Foundation 6, giving you all the power and flexibility you need to build complex, mobile friendly websites without having to start from scratch.
http://jointswp.com
851 stars 272 forks source link

npm ERR! code ELIFECYCLE #407

Closed gabrielbajada closed 5 years ago

gabrielbajada commented 5 years ago

Hi @JeremyEnglert

As always, great work with JointsWP. It has been my go-to for at least 6 years and I can't thank you enough.

I'm starting to get the following error when I execute npm run watch. And because you and @mrscharf have been so kind as to help me in the past, I was hoping you guys recognise my problem.

Please help. Thank you so much.

Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ gulp --version
[11:42:05] CLI version 3.9.1
[11:42:05] Local version 4.0.0
Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ npm run watch
> jointswp-sass@5.0.0 watch /Volumes/Clients/Pawlu Mizzi/2019/0132 – Website/Pawlu Mizzi
> gulp watch

[11:06:26] Using gulpfile /Volumes/Clients/Pawlu Mizzi/2019/0132 – Website/Pawlu Mizzi/gulpfile.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                   ^

TypeError: Cannot read property 'apply' of undefined
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jointswp-sass@5.0.0 watch: `gulp watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jointswp-sass@5.0.0 watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabriel/.npm/_logs/2019-10-02T09_06_26_065Z-debug.log
garretthyder commented 5 years ago

Hi @gabrielbajada I feel this is a version issue on gulp, can you try; npm i -g gulp-cli As mentioned in this related issue - https://github.com/gulpjs/gulp-cli/issues/84

gabrielbajada commented 5 years ago

Thanks for replying @garrett-eclipse . I tried that out but I got this:

Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ npm i -g gulp-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabriel/.npm/_logs/2019-10-03T07_49_09_754Z-debug.log
Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ 
garretthyder commented 5 years ago

Try using sudo for the commaind; sudo npm i -g gulp-cli

gabrielbajada commented 5 years ago

Thanks again, however Ii got a different error now. Any idea @garrett-eclipse ?

Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ sudo npm i -g gulp-cli
Password:
Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/gabriel/.npm/_cacache/content-v2/sha512/dd/3d'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabriel/.npm/_logs/2019-10-07T09_48_19_032Z-debug.log
Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ 
garretthyder commented 5 years ago

Hi @gabrielbajada my bad I see some notes on threads with that issue about not needing sudo for that command, can you try this instead; npm i -g gulp-cli

gabrielbajada commented 5 years ago

Hi @garrett-eclipse I think this is the first solution you gave me. No worries, I tried it again anyways. This time it gave me a different error than the first time.

Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ npm i -g gulp-cli
Unhandled rejection Error: EACCES: permission denied, rename '/Users/gabriel/.npm/_cacache/tmp/15e2fff9' -> '/Users/gabriel/.npm/_cacache/content-v2/sha512/dd/3d/19bc7555e0bc1b50f4565ec57c28e43d4f6b917f63020cc6be751ac800af7d523c5641c23fc313334bc8ccf78589603578f9c110e9495af4d5fcd9407c20'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabriel/.npm/_logs/2019-10-08T08_23_33_484Z-debug.log
Gabriels-MacBook-Pro:Pawlu Mizzi gabriel$ 
garretthyder commented 5 years ago

Hi @gabrielbajada it looks like you have some permissions issues with your npm install, you can try to reset ownership;

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Reference - https://stackoverflow.com/a/50639828

If that doesn't work the other commands for reset I fonud;

sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) ~/.config

We can continue on this thread if that's not working, but I'm going to close as it's not related to JointsWP itself. As well the error does indicate to seek help with the NPM community so if we're not getting anywhere I do suggest opening a thread there - https://npm.community

gabrielbajada commented 5 years ago

Hey @garrett-eclipse I went ahead and did a fresh install in a new folder and manually took all my files over to it. Thanks for your help though.

garretthyder commented 5 years ago

No worries @gabrielbajada hope the fresh install smooths things out. All the best