Getting errors after running npm install

i am a newbee to all this nodejs/npm stuff so pls help me out. i am on win10
after the “composer create-project” which the interactive options didn’t show up, so worked around with these
vendor\bin\sage meta
vendor\bin\sage config
vendor\bin\sage preset

after that i am struck at ‘npm install’ getting a lot of errors. searched a lot but couldn’t find any solution. all the issues similar to mine are posted some 4 years back. tried some of the solutions suggested there but of no luck still stuck at this :frowning: pls someone help me. TIA. below are the last few lines showed on my cmd

8 Warning(s)
1 Error(s)

Time Elapsed 00:01:11.84
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\xampp\htdocs\upma\wp-content\themes\tori\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\xampp\htdocs\upma\wp-content\themes\tori\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”
gyp ERR! cwd C:\xampp\htdocs\upma\wp-content\themes\tori\node_modules\node-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

npm ERR! errno 1
npm ERR! node-sass@4.9.4 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.4 postinstall 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:

What version of NodeJS do you have installed?

Run this command: node -v or node --version

thanks for the swift reply, installed latest stable version of nodejs just a few days back
node v12.16.1
npm v6.14.4

Your NodeJS version is likely too new. Use nvm to switch to a lower version:

If you have nvm installed, try this: nvm use 8

I am using node - v8.17.0 on the latest copy of everything too, works fine.

1 Like

thanks a ton, it worked. but stuck at a new problem now :expressionless:

couldn’t able to do with NVM. but uninstalled node and installed 8.x everything completed without any errors. after ‘yarn start’ (couldn’t find a guide for npm related commands, so using yarn) showing ‘compiled successfully’ in cmd and localhost:3000 is popping up in browser but with a blank page and that loading dot swinging forever. going through the forums to find a solution, saw a lot of similar issues, trying them out. thanks again :slight_smile:

This topic was automatically closed after 42 days. New replies are no longer allowed.