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.

node-pre-gyp install --fallback-to-build | at bcrypt installation

See original GitHub issue

node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Completion callback never invoked! node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\WORKSPACE\project\node_modules\bcrypt\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd C:\workspace\project\node_modules\bcrypt node-pre-gyp ERR! node -v v8.12.0 node-pre-gyp ERR! node-pre-gyp -v v0.9.1 node-pre-gyp ERR! This is a bug in node-pre-gyp. node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help: node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues npm WARN server@1.0.0 No description npm WARN server@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

npm ERR! code ELIFECYCLE npm ERR! errno 6 npm ERR! bcrypt@2.0.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 6 npm ERR! npm ERR! Failed at the bcrypt@2.0.1 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:

0 info it worked if it ends with ok 1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’, 1 verbose cli ‘C:\Users\user-\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘install’, 1 verbose cli ‘–save’, 1 verbose cli ‘bcrypt’ ] 2 info using npm@6.4.1 3 info using node@v8.12.0 4 verbose npm-session fbf27f1632bcb6fc 5 silly install loadCurrentTree 6 silly install readLocalPackageData 7 http fetch GET 200 https://registry.npmjs.org/bcrypt 49ms (from cache) 8 silly pacote range manifest for bcrypt@^2.0.1 fetched in 89ms 9 timing stage:loadCurrentTree Completed in 2764ms 10 silly install loadIdealTree 11 silly install cloneCurrentTreeToIdealTree 12 timing stage:loadIdealTree:cloneCurrentTree Completed in 7ms 13 silly install loadShrinkwrap 14 timing stage:loadIdealTree:loadShrinkwrap Completed in 316ms 15 silly install loadAllDepsIntoIdealTree 16 silly resolveWithNewModule bcrypt@2.0.1 checking installable status 17 silly tarball trying https://registry.npmjs.org/bcrypt/-/bcrypt-2.0.1.tgz by hash: sha512-DwB7WgJPdskbR+9Y3OTJtwRq09Lmm7Na6b+4ewvXjkD0nfNRi1OozxljHm5ETlDCBq9DTy04lQz+rj+T2ztIJg== 18 silly extract https://registry.npmjs.org/bcrypt/-/bcrypt-2.0.1.tgz extracted to C:\Users\user-\AppData\Local\Temp\npm-24016-f9bec8a6\unpack-239b0021 (437ms) 19 silly addBundled read tarball 20 silly cleanup remove extracted module 21 http fetch GET 304 https://registry.npmjs.org/nan 395ms (from cache) 22 silly pacote version manifest for nan@2.10.0 fetched in 405ms 23 silly resolveWithNewModule nan@2.10.0 checking installable status 24 http fetch GET 304 https://registry.npmjs.org/fsevents 94ms (from cache) 25 silly pacote range manifest for fsevents@^1.2.2 fetched in 105ms 26 silly resolveWithNewModule fsevents@1.2.4 checking installable status 27 silly tarball trying https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz by hash: sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== 28 silly extract https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz extracted to C:\Users\user-\AppData\Local\Temp\npm-24016-f9bec8a6\unpack-70a58c79 (997ms) 29 silly addBundled read tarball 30 silly cleanup remove extracted module 31 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 3925ms 32 timing stage:loadIdealTree Completed in 4726ms

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KyleNehmancommented, Dec 21, 2018

Same thing trying to install sqlite3 as a dep for moloch. Not just bcrypt (obviously but worth saying)

Edit: Through a roller coaster of debugging crap here’s what I did for my sqllite3 installation. YMMV:

NOTE I use unsafe-perms because npm was telling me root didn’t have permissions (even after chmod and chown) and this is a VM so I wasn’t being picky. Please be careful on your production servers.

Fresh Ubuntu 16.04 server

  • apt-get install pkg-config
  • Updated my NodeJS (apt was giving me version 4.x)
  • apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
  • npm install canvas@next --unsafe-perm --build-from-source -g
  • node-gyp install --fallback-to-build
  • npm install --unsafe-perm -g sqlite3
0reactions
nicolasnoblecommented, Dec 21, 2018

The permission issue when running on Linux containers as root is a known problem worth npm, not node-pre-gyp, and if you were encountering issues in a Linux VM, then your problem had nothing to do with the initial windows callback completion issue.

I believe that the missing callback problem has been resolved, and that sqlite3 has a recent enough version of node-pre-gyp to get this one bugfix.

Any other issue new needs to be reported separately with full details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bcrypt@3.0.3 install: `node-pre-gyp install --fallback-to-build ...
I was facing this issue because of my node js version 12.8.3. I just changed my node version to 12.4.1. And then try...
Read more >
Bcrypt Installation error `node-pre-gyp install --fallback-to-build
It is because of the bcrypt module dependency node-gyp . I suggest you use a library bcryptjs which has no dependencies and more...
Read more >
`node-pre-gyp install --fallback-to-build` on Linux - YouTube
How to install bcrypt on Windows and Linux The steps are as follows : Install stable version of node withsudo npm cache clean...
Read more >
fallback-to-build` bcrypt 3.0.3 - node-pre-gyp install - Super User
The solution for me was: Upgrade node to a stable version: I manually downloaded and installed Windows installer from Node website. Install the ......
Read more >
node-pre-gyp - npm
Install. node-pre-gyp is designed to be installed as a local dependency of your Node.js C++ addon and accessed like:
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