My issue arose when running npm install in my theme directory. I had already successfully installed gulp and bower globally as per the Requirements on the Sage GitHub page:
My limited experience with npm (and the CLI in general, tbh – I am making a big effort to learn) means unfortunately I can’t make any comment on the errors thrown, but here is the link to my npm-debug.log file; hopefully that will help.
If there is any more information I can provide, I’m happy to do so.
Thanks in advance for the help, and for such a great resource.
Then used the nvm install command to install the version of node I mentioned in the other thread. You will also want to use nvm alias to setup a default for use when opening up a shell.
UPDATE: I got all the packages installed for 7.0.3 (npm install). I used sudo chown -R $(whoami) ~/.npm to reclaim ownership of the .npm directory (I was constantly using sudo, I’m not sure if that was the cause of any of my troubles). I also brought node up to the latest stable version via nvm after having rolled back to an earlier version whilst troubleshooting 8.0.0, and finally reinstalled grunt-cli globally, just to make sure.
Thanks @benword – I gave that a try, though no success.
I’ve decided to use 7.0.3 for now, as I figure my inexperience with packages like gulp, node etc is getting in the way. I was able to get 7.0.3 up and running before with little to no trouble – although now I’m having similar difficulty with installing npm (where I didn’t have any before trying 8.0.0).
Here’s some Terminal output which may be helpful, as well as my most recent log file:
bootstrap#3.3.1 assets/vendor/bootstrap
└── jquery#1.11.1
sh: grunt: command not found
npm ERR! Darwin 14.0.0
npm ERR! argv "/usr/local/lib/node_modules/nvm/versions/node/v0.12.0/bin/node" "/usr/local/lib/node_modules/nvm/versions/node/v0.12.0/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! roots@7.0.3 postinstall: `node node_modules/bower/bin/bower install && grunt dev`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the roots@7.0.3 postinstall script 'node node_modules/bower/bin/bower install && grunt dev'.
npm ERR! This is most likely a problem with the roots package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/bower/bin/bower install && grunt dev
npm ERR! You can get their info via:
npm ERR! npm owner ls roots
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Dave/Dropbox/__theagsc/_localsites/theagsc/wp-content/themes/theagsc/npm-debug.log