Search code examples
javanode.jsnpmsails.jsloopback

NPM install java Issue on windows 10


I am using cmd as administrator to install java using npm install java and i am getting an error. All environment variables are set as well. Any help will be very applicable. Thanks in advance..

gyp ERR! configure error gyp ERR! stack Error:gypfailed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\MyName\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js :336:16) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MyName\\AppData\\Roaming\\npm\\node_modules\\node-gy p\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\WINDOWS\system32 gyp ERR! node -v v8.1.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok


Solution

  • Follow this procedure

    rm -rf ~/.node-gyp/
    rm -r node_modules/.bin/;
    rm -r build/
    npm install bcrypt
    

    and set

    npm config set msvs_version 2013 --global