Skip to content

node-pre-gyp ERR in npm install #626

Closed

Description

@ernitingoel

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    bug report
  • Do you want to request a feature or report a bug?
    Bug Report
  • What is the current behavior?
    node-pre-gyp ERR in npm install
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
    Download the package and run the npm-install on Windows 7 64 bit
  • What is the expected behavior?
    npm install should complete with out error
  • What is the motivation / use case for changing the behavior?
  • Please tell us about your environment:
  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Error:

C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master>npm install
npm WARN prefer global marked@0.3.5 should be installed with -g
node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v47-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@1.4.0 and node@5.11.0 (node-v47 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\goelniti\AppData\Local\Programs\Python\Python36\python.EXE" is v3.6.0a1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Users\goelniti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack at C:\Users\goelniti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:193:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
gyp ERR! stack at Socket. (internal/child_process.js:323:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:484:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\tools\nodejs\node.exe" "C:\Users\goelniti\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli\lib\binding\node-v47-win32-x64\zopfli.node" "--module_name=zopfli" "--module_path=C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli\lib\binding\node-v47-win32-x64" "--msvs_version=2013"
gyp ERR! cwd C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli
gyp ERR! node -v v5.11.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli\lib\binding\node-v47-win32-x64\zopfli.node --module_na
me=zopfli --module_path=C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli\lib\binding\node-v47-win32-x64 --msvs_version=2013'(1)
node-pre-gyp ERR! stack at ChildProcess. (C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\tools\nodejs\node.exe" "C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"node-pre-gyp ERR! cwd C:\FAI\Learning\AngularJS2\angular2-webpack-starter-master\node_modules\node-zopfli
node-pre-gyp ERR! node -v v5.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
npm WARN install:node-zopfli@1.4.0 node-zopfli@1.4.0 install: node-pre-gyp install --fallback-to-build
npm WARN install:node-zopfli@1.4.0 Exit status 1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12

Activity

  1. aminebizid commented on May 24, 2016

    @aminebizid

    +1

  2. michalstepien commented on May 24, 2016

    @michalstepien

    gyp ERR! stack Error: Python executable "C:\Users\goelniti\AppData\Local\Programs\Python\Python36\python.EXE" is v3.6.0a1, which is not supported by gyp. gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. gyp ERR! stack at failPythonVersion

    See: nodejs/node-gyp#193

  3. ernitingoel commented on May 24, 2016

    @ernitingoel
    Author

    After using that now I am having the following error

    npm WARN prefer global marked@0.3.5 should be installed with -g
    node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v47-win32-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@1.4.0 and node@5.11.0 (node-v47 ABI) (falling back to source compile with node-gyp)
    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fseve
    nts@1.0.12

  4. PatrickJS commented on May 25, 2016

    @PatrickJS
    Owner

    remove the compression plugin for webpack compression-webpack-plugin and install again

  5. ernitingoel commented on May 25, 2016

    @ernitingoel
    Author

    What impact it will be having on the functionality?

  6. PatrickJS commented on May 25, 2016

    @PatrickJS
    Owner

    you need to remove the compression-webpack-plugin from prod as well. the impact is that the files won't be compressed

  7. aminebizid commented on May 26, 2016

    @aminebizid

    We solved it by installing Python x86 version between 2.5 and 3.0 on windows

  8. ernitingoel commented on Jun 10, 2016

    @ernitingoel
    Author

    FYI, for node-gyp related error, please make sure it met the requirements as mentioned in

    https://github.com/nodejs/node-gyp

  9. dsebastien commented on Jun 10, 2016

    @dsebastien

    node-gyp on Windows is a nightmare :)
    Most of the time, just running npm install --no-optional avoids the issue entirely as node-gyp is often requested through optional dependencies

  10. PatrickJS commented on Jun 12, 2016

    @PatrickJS
    Owner

    I removed the compression-webpack-plugin to avoid errors in osx and windows

  11. AndreiSoroka commented on Aug 3, 2016

    @AndreiSoroka

    me helped: apt-get install build-essential
    p.s. linux

  12. pthibodeaux commented on Aug 26, 2016

    @pthibodeaux

    I am getting the same errors in Windows. I tried several suggestions from above, but still no success

  13. pthibodeaux commented on Aug 30, 2016

    @pthibodeaux

    I see notes that you should "you need to remove the compression-webpack-plugin from prod as well. the impact is that the files won't be compressed"
    How do you do this?

  14. sivan123 commented on Sep 3, 2016

    @sivan123

    Could some one tell how to remove the compression-webpack-plugin?

  15. 5 remaining items

  16. joshwiens commented on Nov 25, 2016

    @joshwiens
    Contributor

    Personal note to document this in the wiki for future Windows users.

  17. self-assigned this
    on Nov 25, 2016
  18. michelgokan commented on Feb 17, 2017

    @michelgokan

    I have latest version of Mac OS X together with latest version of Xcode and the same issue:

    node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v46-darwin-x64.tar.gz 
    node-pre-gyp ERR! Pre-built binaries not found for bcrypt@1.0.2 and node@4.7.3 (node-v46 ABI) (falling back to source compile with node-gyp) 
    
  19. migueltol22 commented on Jun 6, 2017

    @migueltol22

    I had the same issue @michelgokan but following @srinivasdamam post solved the issue for me. Hopefully it works for you

  20. raffaelprospero commented on Jun 27, 2017

    @raffaelprospero
  21. imsarvesh commented on Aug 30, 2017

    @imsarvesh

    try using LTS version of Nodejs instead of current version.

  22. ktamaral commented on Sep 20, 2017

    @ktamaral

    We had the same issue. To solve it, we upgraded the version of Node.

  23. juanchavezlive commented on Nov 23, 2017

    @juanchavezlive

    @srinivasdamam solution worked for me

  24. tinhnqjp commented on Jan 30, 2018

    @tinhnqjp

    Same error:
    node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v51-linux-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for v8-debug@0.7.7 and node@7.3.0 (node-v51 ABI) (falling back to source compile with node-gyp)

    I try and OK:
    npm install -g node-inspector@0.7.5

  25. ahgood commented on Feb 8, 2018

    @ahgood

    Solution on macOS:
    rm -rf /Users/LOGINNAME/.npm/
    npm install -g PACKAGE

  26. xixihaha134 commented on Feb 13, 2018

    @xixihaha134

    npm install --no-optional
    it work for me

  27. mrpatel15 commented on Feb 16, 2018

    @mrpatel15

    Works for me..

  28. CaliforniaSoil commented on May 11, 2018

    @CaliforniaSoil

    if you cannot solve with npm, use another package manager
    brew install yarn
    yarn add PACKAGE

  29. ani-naslyan commented on Oct 1, 2018

    @ani-naslyan

    @CaliforniaSoil yarn didn't help either

  30. PostImpatica commented on Jan 9, 2019

    @PostImpatica

    @CaliforniaSoil Even though I saw @ani-naslyan and his comment saying Yarn didn't work just as a last resort I tried it anyway.

    • Delete node_modules directory
    • using nvm for windows, I changed to version 6.11.4 of node
    • I installed the latest Yarn
    • I ran yarn in the root of my project

    Behold! Everything magically worked!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions