Last active
November 5, 2017 19:04
-
-
Save majidzeno/ef3b978d1a4f2fa082956bb5e225c06d to your computer and use it in GitHub Desktop.
npm issues and how i fixed it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install.... | |
//an error occured | |
> [email protected] postinstall /Applications/XAMPP/xamppfiles/htdocs/myproject/wp-content/themes/Foundationpress | |
> bower install && gulp build | |
module.js:474 | |
throw err; | |
^ | |
Error: Cannot find module 'internal/fs' | |
at Function.Module._resolveFilename (module.js:472:15) | |
at Function.Module._load (module.js:420:25) | |
at Module.require (module.js:500:17) | |
at require (internal/module.js:20:19) | |
at evalmachine.<anonymous>:17:20 | |
at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/myproject/wp-content/themes/Foundationpress/node_modules/bower/node_modules/graceful-fs/fs.js:11:1) | |
at Module._compile (module.js:573:32) | |
at Object.Module._extensions..js (module.js:582:10) | |
at Module.load (module.js:490:32) | |
at tryModuleLoad (module.js:449:12) | |
npm ERR! Darwin 16.7.0 | |
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" | |
npm ERR! node v7.0.0 | |
npm ERR! npm v3.10.8 | |
npm ERR! code ELIFECYCLE | |
npm ERR! [email protected] postinstall: `bower install && gulp build` | |
npm ERR! Exit status 1 | |
npm ERR! | |
npm ERR! Failed at the [email protected] postinstall script 'bower install && gulp build'. | |
npm ERR! Make sure you have the latest version of node.js and npm installed. | |
npm ERR! If you do, this is most likely a problem with the foundationpress package, | |
npm ERR! not with npm itself. | |
npm ERR! Tell the author that this fails on your system: | |
npm ERR! bower install && gulp build | |
npm ERR! You can get information on how to open an issue for this project with: | |
npm ERR! npm bugs foundationpress | |
npm ERR! Or if that isn't available, you can get their info via: | |
npm ERR! npm owner ls foundationpress | |
npm ERR! There is likely additional logging output above. | |
npm ERR! Please include the following file with any support request: | |
npm ERR! /Applications/XAMPP/xamppfiles/htdocs/myproject/wp-content/themes/Foundationpress/npm-debug.log | |
--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
// How i Fixed that ? | |
$ rm -rf /usr/local/lib/node_modules/npm | |
$ sudo n 6. | |
$ sudo npm install -g [email protected] | |
$ sudo npm install -g npm@next | |
$ sudo n 7. | |
//then i can run $npm run watch .. to start the gulp and the lint --- > end of gist | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment