Skip to content

Install errors: node-pre-gyp ERR #2406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rajinder-yadav opened this issue Sep 28, 2016 · 5 comments
Closed

Install errors: node-pre-gyp ERR #2406

rajinder-yadav opened this issue Sep 28, 2016 · 5 comments

Comments

@rajinder-yadav
Copy link

Please provide us with the following information:

OS?

Linux ubuntu

Versions.

angular-cli: 1.0.0-beta.16
node: 6.6.0
os: linux x64

Repro steps.

sudo su
pm install -g angular-cli@latest

The log given by the failure.

[execsync v1.0.2] Attempting to compile native extensions.
[execSync v1.0.2]
    Native code compile failed!!

> [email protected] install /opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.1-node-v48-linux-x64.tar.gz
 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to sourc
e compile with node-gyp) 
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.6.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/local/lib/node_modules/angular-cli/node_modules/nod
e-zopfli/.node-gyp"
make: Entering directory '/opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli/build'
make: *** No rule to make target '../.node-gyp/6.6.0/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/local/lib/node_modules/angular-cli/node_modules/node-gyp/lib/build.js:276
:23)
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 Linux 4.4.0-38-generic
gyp ERR! command "/opt/local/bin/node" "/opt/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js" "b
uild" "--fallback-to-build" "--module=/opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v
48-linux-x64/zopfli.node" "--module_name=zopfli" "--module_path=/opt/local/lib/node_modules/angular-cli/node_modules/node
-zopfli/lib/binding/node-v48-linux-x64"
gyp ERR! cwd /opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli
gyp ERR! node -v v6.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/opt/local/bin/node /opt/local/lib/node_modules/angular-cli/node_module
s/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/opt/local/lib/node_modules/angular-cli/node_modules/node-z
opfli/lib/binding/node-v48-linux-x64/zopfli.node --module_name=zopfli --module_path=/opt/local/lib/node_modules/angular-c
li/node_modules/node-zopfli/lib/binding/node-v48-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess. (/opt/local/lib/node_modules/angular-cli/node_modules/node-pre-gy
p/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.0-38-generic
node-pre-gyp ERR! command "/opt/local/bin/node" "/opt/local/lib/node_modules/angular-cli/node_modules/.bin/node-pre-gyp" 
"install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli
node-pre-gyp ERR! node -v v6.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok 
Failed to execute '/opt/local/bin/node /opt/local/lib/node_modules/angular-cli/node_modules/node-gyp/bin/node-gyp.js buil
d --fallback-to-build --module=/opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib/binding/node-v48-linu
x-x64/zopfli.node --module_name=zopfli --module_path=/opt/local/lib/node_modules/angular-cli/node_modules/node-zopfli/lib
/binding/node-v48-linux-x64' (1)

> [email protected] install /opt/local/lib/node_modules/angular-cli/node_modules/node-sass
> node scripts/install.js

@rajinder-yadav
Copy link
Author

I do have node-gpy installed.

# npm -g list node-gyp
/opt/local/lib
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected] 
│ └─┬ [email protected]
│   └── [email protected] 
├── [email protected] 
├─┬ [email protected]
│ └── [email protected] 
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected] 

@vlad-mk
Copy link

vlad-mk commented Sep 29, 2016

because of some reason node-gyp didn't load the nodejs headers.
I've found the following workaround:
/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp node-pre-gyp install --fallback-to-build

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Sep 29, 2016

OK I run something similar, do I need to do anything else to do the install??

# /opt/local/bin/node-gyp node-pre-gyp install --fallback-to-build
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp http GET https://nodejs.org/download/release/v6.6.0/node-v6.6.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v6.6.0/node-v6.6.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v6.6.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v6.6.0/SHASUMS256.txt
6.6.0
gyp info ok 

@filipesilva
Copy link
Contributor

See #1560 (comment)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants