编程语言
首页 > 编程语言> > node-pre-gyp WARN Using request for node-pre-gyp https download

node-pre-gyp WARN Using request for node-pre-gyp https download

作者:互联网

when i start to run my node project below:

Command代码  收藏代码
  1. $ DEBUG=xxx_project:* npm start  

 

 

then it apperred the err below:

Error: Cannot find module '/Users/xxx/Documents/workspace/xxx-project/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node'
code: 'MODULE_NOT_FOUND',
npm ERR! code ELIFECYCLE
npm ERR! errno 1

 

then i try this: $ npm rebuild

> bcrypt@4.0.1 install /Users/Documents/workspace/ipet-server/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download

 

 

try using build from source like this:

 

Command代码  收藏代码
  1. npm --build-from-source install bcrypt -g  

 

 

For anyone else here who is getting the warning:

node-pre-gyp WARN Using needle for node-pre-gyp https download

 

it either needs to be built from source or installed via binary download. If you have Visual Studio installed, you ca try npm install sqlite3 --build-from-source, which is also a safer option.

 

 

bcrypt needs to be built natively. If you don't feel comfortable building it with c++ compiler, I suggest you take a look at the bcrypt-nodejs module.

标签:node,pre,npm,gyp,download,bcrypt
来源: https://www.cnblogs.com/diruizhixia/p/15212138.html