npm install failed on MacOS HighSierra 10.13.3
See original GitHub issue$ npm install -g git-hours
[1] + 44543 suspended (signal) npm install -g git-hoursModule git-hours@1.3.0 checking
/usr/local/bin/git-hours -> /usr/local/lib/node_modules/git-hours/src/index.js
> nodegit@0.13.2 install /usr/local/lib/node_modules/git-hours/node_modules/nodegit
> node lifecycleScripts/install
[nodegit] Fetching binary from S3.
[nodegit] Failed to install prebuilt binary:
{ Error: Command failed: "/usr/local/lib/node_modules/git-hours/node_modules/nodegit/node_modules/.bin/node-pre-gyp" install --fallback-to-build=false
node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/usr/local/Cellar/node/9.11.1/bin/node',
node-pre-gyp verb cli '/usr/local/lib/node_modules/git-hours/node_modules/nodegit/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli 'install',
node-pre-gyp verb cli '--fallback-to-build=false' ]
node-pre-gyp info using node-pre-gyp@0.6.28
node-pre-gyp info using node@9.11.1 | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "/usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/nodegit.node" (not found)
node-pre-gyp http GET https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.13.2-node-v59-darwin-x64.tar.gz
node-pre-gyp http 403 https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.13.2-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.13.2-node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! stack at Request.<anonymous> (/usr/local/lib/node_modules/git-hours/node_modules/nodegit/node_modules/node-pre-gyp/lib/install.js:101:37)
node-pre-gyp ERR! stack at Request.emit (events.js:185:15)
node-pre-gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/git-hours/node_modules/request/request.js:1068:10)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:180:13)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:540:21)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:445:20)
node-pre-gyp ERR! stack at TLSSocket.emit (events.js:180:13)
node-pre-gyp ERR! stack at addChunk (_stream_readable.js:274:12)
node-pre-gyp ERR! stack at readableAddChunk (_stream_readable.js:261:11)
node-pre-gyp ERR! System Darwin 17.4.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/9.11.1/bin/node" "/usr/local/lib/node_modules/git-hours/node_modules/nodegit/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=false"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/git-hours/node_modules/nodegit
node-pre-gyp ERR! node -v v9.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
at ChildProcess.exithandler (child_process.js:273:12)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
killed: false,
code: 1,
signal: null,
cmd: '"/usr/local/lib/node_modules/git-hours/node_modules/nodegit/node_modules/.bin/node-pre-gyp" install --fallback-to-build=false' }
[nodegit] Building manually. (You'll be here a while.)
[nodegit] Regenerating and configuring code
$ git-hours
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module '../build/Debug/nodegit.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/git-hours/node_modules/nodegit/dist/nodegit.js:18:12)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/git-hours/src/index.js:4:11)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
System Information
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D102
$ node -v
v9.11.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Error installing node-gyp on macOS High Sierra 10.13.6
I have tried re-installing XCode command-line utility but that didn't work. Does this package support mac OS 10.13.5 ? pm ERR! code 1...
Read more >macOS High Sierra 10.13.4 Update - Apple Community
I am on macOS 10.13.3 and downloaded the 10.13.4 update from the Mac App Store, clicked on Restart when prompted to Install it...
Read more >Installation of macOS High Sierra Update 10.13.4 failed
The system successfully booted into 10.13.3. Now I'm trying to update the OS from the App Store again. Share.
Read more >How To Update Node.js on MacOS: Hindsight on Old Mac
In Homebrew, llvm is a dependency for node package. Homebrew updates llvm by installing from sources. However, the sources failed to build.
Read more >How to Install Node.js and NPM on Mac OS - OSXDaily
Looks like a javascript error, it's probably nothing to do with node but instead something with the Javascript itself, thus check the actual ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ruucm solution worked for me on Ubuntu 16.
I installed nodegit with
npm install -g nodegit
. I ran into a number of errors on a new Ubuntu 16 image. I had to first install typical dev libs (ssl, curl, other build tools). Then I needed to installn
and use that to switch to nodev6.14.4
. Once I got nodegit installed, I did:sudo mkdir -p /usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/
and then
sudo cp /usr/local/lib/node_modules/nodegit/build/Release/nodegit.node /usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/
I got it working by first installing nodegit separately and then doing
cp ~/.nvm/versions/node/v10.8.0/lib/node_modules/nodegit/build/Release/nodegit.node ~/.nvm/versions/node/v10.8.0/lib/node_modules/git-hours/node_modules/nodegit/build/Release
I’m using nvm so that’s where my node packages get installed but you can copy from wherever you find nodegit.node to wherever git-hours looks for it