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.

NodeGit Installation Error with gyp

See original GitHub issue

System information

  • node version: v10.15.1
  • npm or yarn version: v6.4.1
  • OS/version/architecture: Raspbian 9.6 on Raspberry Pi 2 B (ARM6)
  • Applicable nodegit version: 0.24.0
node -v
npm -v # (or yarn -v)
node -e "console.log(process.platform)"
node -e "console.log(require('os').release())"
node -e "console.log(console.log(process.arch))"

Error is thrown after sudo npm install nodegit

> nodegit@0.24.0 install /nize/nize/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install

[nodegit] Running pre-install script
[nodegit] Running install script
node-pre-gyp
WARN
Using request for node-pre-gyp https download
node-pre-gyp
WARN Pre-built binaries not installable for nodegit@0.24.0 and node@10.15.1 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN
Hit error EACCES: permission denied, mkdir '/nize/nize/node_modules/nodegit/build'

gyp

WARN
EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/10.15.1"
gyp

WARN EACCES attempting to reinstall using temporary dev dir "/nize/nize/node_modules/nodegit/.node-gyp"
gyp

WARN install got an error, rolling back install
gyp
WARN install got an error, rolling back install
gyp
ERR! configure error
gyp
ERR!
stack Error: EACCES: permission denied, mkdir '/nize/nize/node_modules/nodegit/.node-gyp'
gyp ERR! System Linux 4.14.79+
gyp
ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/nize/nize/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/nize/nize/node_modules/nodegit/build/Release" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /nize/nize/node_modules/nodegit
gyp

ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR!

not ok
node-pre-gyp
ERR! build error
node-pre-gyp
ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/nize/nize/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/nize/nize/node_modules/nodegit/build/Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/nize/nize/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack
at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp
ERR! System Linux 4.14.79+
node-pre-gyp ERR!
command
"/usr/local/bin/node" "/nize/nize/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /nize/nize/node_modules/nodegit
node-pre-gyp
ERR!
node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp
ERR!
not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/nize/nize/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/nize/nize/node_modules/nodegit/build/Release --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1
npm WARN nize@1.0.0 No description
npm WARN nize@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodegit@0.24.0 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.24.0 install 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:
npm ERR!     /root/.npm/_logs/2019-02-02T05_24_20_679Z-debug.log

Seems like it has something to do with node-gyp and/or node-pre-gyp.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:9
  • Comments:13

github_iconTop GitHub Comments

5reactions
deepaksinghsolanki1989commented, Sep 28, 2019

Screenshot from 2019-09-28 13-47-19 Facing same issue while installing aws-amplify/cli. I am using node version v10.16.3 and npm version 6.9.0. Any solution to fix this issue?

2reactions
SiRumCzcommented, May 29, 2019

Try python 2 instead of python 3 and see if it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Errors installing nodegit - Stack Overflow
I am a real newbe and previously only used html css and PHP. scanning the web I found that nodegit was a possible...
Read more >
nodegit/nodegit - Gitter
npm ERR! npm ERR! Failed at the nodegit@0.6.3 install script 'node lifecycleScripts/install'. npm ERR! This is most likely a problem with the nodegit...
Read more >
nodegit-gyp - npm
Node.js native addon build tool forked for NodeGit. ... Start using nodegit-gyp in your project by running `npm i nodegit-gyp`.
Read more >
Building from source - NodeGit
If you encounter errors, you most likely have not configured the dependencies correctly. Installing dependencies: Mac OS X. Install XCode Command Line Tools ......
Read more >
nodegit - npm.io
NodeGit will work on most systems out-of-the-box without any native dependencies. npm install nodegit. If you receive errors about libstdc++, ...
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