question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running npm-install

See original GitHub issue

Today, I started getting errors when running npm install for my web application. I seem to have traced it to npm-gyp. Here is what I get when I try to install it:

$ npm install node-gyp@3.6.1

> microtime@2.1.3 install C:\Development\node_modules\microtime
> node-gyp rebuild


C:\Development\node_modules\microtime>if not defined npm_config_node_gyp (node "C:\Users\me\AppData\Roaming\npm\node_modules\n                                                                                                       pm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Traceback (most recent call last):
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
    return gyp_main(args)
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 98, in Load
    generator.CalculateVariables(default_variables, params)
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1900, in CalculateVariables
    generator_flags.get('msvs_version', 'auto'))
  File "C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py", line 434, in SelectVisualStudioVersion
    versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2017'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "re                                                                                                       build"
gyp ERR! cwd C:\Development\node_modules\microtime
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Advaxis.Norm.Web@0.0.0 C:\Development\Advaxis\Advaxis.norm\Advaxis.Norm.web
+-- UNMET PEER DEPENDENCY @angular/common@2.4.10
+-- UNMET PEER DEPENDENCY @angular/compiler@2.4.10
+-- UNMET PEER DEPENDENCY @angular/core@2.4.10
+-- node-gyp@3.6.1
+-- UNMET PEER DEPENDENCY rxjs@5.4.0
`-- UNMET PEER DEPENDENCY zone.js@0.7.8

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN angular2-toaster@3.0.1 requires a peer of @angular/common@^4.0.0 but none was installed.
npm WARN angular2-toaster@3.0.1 requires a peer of @angular/compiler@^4.0.0 but none was installed.
npm WARN angular2-toaster@3.0.1 requires a peer of @angular/core@^4.0.0 but none was installed.
npm WARN angular2-universal@2.1.0-rc.1 requires a peer of rxjs@~5.0.0-beta.12 but none was installed.
npm WARN angular2-universal@2.1.0-rc.1 requires a peer of zone.js@~0.6.21 but none was installed.
npm WARN angular2-universal-polyfills@2.1.0-rc.1 requires a peer of zone.js@~0.6.21 but none was installed.
npm WARN Advaxis.Norm.Web@0.0.0 No description
npm WARN Advaxis.Norm.Web@0.0.0 No repository field.
npm WARN Advaxis.Norm.Web@0.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: microtime@2.1.3 (node_modules\microtime):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: microtime@2.1.3 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:44 (10 by maintainers)

github_iconTop GitHub Comments

151reactions
mercurjlcommented, May 11, 2017

+1

38reactions
skkonstantincommented, May 11, 2017

I’m using windows, after the steps described here https://github.com/nodejs/node-gyp#installation, the error was gone

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >
npm install error from the terminal - Stack Overflow
Running just "npm install" will look for dependencies listed in your package.json. The error you're getting says that you don't have a ...
Read more >
How to solve npm ERR! code 1 when running npm install
Fix npm error code 1 by updating your dependencies · Update one package version in package.json file · Then run npm install ·...
Read more >
NPM install error - Material Design for Bootstrap
Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
Step by step solution for npm install error - M220JS - MongoDB
Delete the package-lock. · If you see a lot of warning & error messages related to npm-gyp, run npm rebuild & this should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found