nickredmark / staart

A starter library for node projects with user accounts.
MIT License
313 stars 39 forks source link

Yarn Add Failing: node-pre-gyp #37

Closed coommark closed 5 years ago

coommark commented 5 years ago

I am trying to install the ooth packages as below, but it is failing over node-pre-gyp. I am using Node v 10.0.0, on Windows 10. I also tried to install with npm, same issue:

yarn add ooth ooth-facebook ooth-google ooth-guest ooth-jwt ooth-local ooth-local-emailer ooth-mongo ooth-twitter ooth-user ooth-ws

Error message:

error C:\sample\auth\node_modules\bcrypt: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: C:\sample\auth\node_modules\bcrypt
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.12.0
node-pre-gyp info using node@10.0.0 | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "C:\sample\auth\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found)
node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@10.0.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v64-win32-x64-unknown.tar.gz
coommark commented 5 years ago

So I downgraded Node to v 8.15.0, but didn't solve the issue. I ran npm install --global --production windows-build-tools

After this I was able to successfully npm install. I guess either installing the build tools, or a combination of that and downgrading Node fixed the issue.