Skip to content

Install failed with error "node-pre-gyp install --fallback-to-build -j 8" #3639

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
haozhutw opened this issue Mar 12, 2021 · 5 comments
Closed

Comments

@haozhutw
Copy link

haozhutw commented Mar 12, 2021

Goals

Install realm-js successfully

Actual Results

Install failed with error:

error /Users/xxx/Documents/apps/MyProject/node_modules/realm: Command failed.
Exit code: 6
Command: node-pre-gyp install --fallback-to-build -j 8
Arguments: 
Directory: /Users/xxx/Documents/apps/MyProject/node_modules/realm
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.15.0
node-pre-gyp info using node@10.16.3 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/xxx/Documents/apps/MyProject/node_modules/realm/compiled/napi-v4_darwin_x64/realm.node" (not found)
node-pre-gyp http GET https://static.realm.io/node-pre-gyp/napi-v4/realm-v6.1.6/realm-v6.1.6-darwin-x64.tar.gz
node-pre-gyp http 200 https://static.realm.io/node-pre-gyp/napi-v4/realm-v6.1.6/realm-v6.1.6-darwin-x64.tar.gz
node-pre-gyp info install unpacking napi-v4_darwin_x64/realm.node
node-pre-gyp ERR! Completion callback never invoked! 
node-pre-gyp ERR! System Darwin 20.3.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/xxx/Documents/apps/MyProject/node_modules/realm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "-j" "8"
node-pre-gyp ERR! cwd /Users/xxx/Documents/apps/MyProject/node_modules/realm
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.15.0

Steps to Reproduce

I'm using yarn install to install this library, but always encounter this issue, then I try npm install but this problem still happens. I then install the node-pre-gyp with sudo npm install -g node-pre-gyp, then running yarn install again, still failed. Can anyone tell me how to install it successfully? Thanks

Version of Realm and Tooling

  • Realm JS SDK Version: 6.1.6
  • Node or React Native: node 10.16.3, React Native 0.61.5
@haozhutw haozhutw changed the title Install failed with error Install failed with error "node-pre-gyp install --fallback-to-build -j 8" Mar 12, 2021
@kneth
Copy link
Contributor

kneth commented Mar 12, 2021

I am not able to reproduce it. Are you able to download the binaries? You can check it by running the following command:

curl -O https://static.realm.io/node-pre-gyp/napi-v4/realm-v6.1.6/realm-v6.1.6-darwin-x64.tar.gz

@haozhutw
Copy link
Author

@kneth Thanks! But this doesn't work because the realm-v6.1.6-darwin-x64.tar.gz is downloaded every time when execute yarn install, so this is not the problem. The real problem is node-pre-gyp running failed, maybe this is a bug of node-pre-gyp, it happens very often. After I switch to a better network connection, and retry for a few times, finally it succeeds to install all the dependencies. Close it since it's probably a bug for node-pre-gyp, very annoying issue.

@kneth
Copy link
Contributor

kneth commented Mar 15, 2021

@haozhutw Thanks for the update! We have a plan to switch to prebuild.

@mrarronz
Copy link

@kneth Have you switched to prebuild? I have also encountered this problem, just stuck here always failed to install

@kneth
Copy link
Contributor

kneth commented Apr 21, 2021

@mrarronz We moved away from node-pre-gyp in version 10.3.0-rc.1. Latest version is 10.4.0.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants