Bcrypt 安装错误`node-pre-gyp install --fallback-to-build
Bcrypt Installation error `node-pre-gyp install --fallback-to-build
我正在尝试安装 bcrypt 但出现错误。我也厌倦了安装旧版本,但仍然遇到同样的错误。
我曾尝试全局安装依赖项 NPM "node-gyp",但仍然出现错误。
错误截图
https://screencast.com/t/ADSe6khYE6pm
bcrypt@3.0.3 install /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
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-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@10.9.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN vidly@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.3 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@3.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
环境
OS: Mac 10.13.4
节点 10.9.0
NPM 6.2.0
谢谢
尝试使用以下命令
npm install --save bcrypt-nodejs && npm uninstall --save bcrypt
这是因为 bcrypt
模块依赖性 node-gyp
。我建议你使用一个库 bcryptjs
,它没有依赖项,而且下载量更多。
npm i bcryptjs --save
别忘了卸载
npm uninstall bcrypt --save
最重要的是 brcypt
有更多依赖关系,例如 python 2.x
。这也是部署的一个问题。最好使用没有依赖关系的库。
bcrypt-nodejs 不再主动维护。请使用 bcrypt 或 bcryptjs,在这种情况下使用 bcryptjs,它对我有效
我正在尝试安装 bcrypt 但出现错误。我也厌倦了安装旧版本,但仍然遇到同样的错误。
我曾尝试全局安装依赖项 NPM "node-gyp",但仍然出现错误。
错误截图 https://screencast.com/t/ADSe6khYE6pm
bcrypt@3.0.3 install /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
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-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.3 and node@10.9.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/rigalpatel/rect-practice/vidly-api-node/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN vidly@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@3.0.3 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@3.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
环境
OS: Mac 10.13.4 节点 10.9.0 NPM 6.2.0
谢谢
尝试使用以下命令
npm install --save bcrypt-nodejs && npm uninstall --save bcrypt
这是因为 bcrypt
模块依赖性 node-gyp
。我建议你使用一个库 bcryptjs
,它没有依赖项,而且下载量更多。
npm i bcryptjs --save
别忘了卸载
npm uninstall bcrypt --save
最重要的是 brcypt
有更多依赖关系,例如 python 2.x
。这也是部署的一个问题。最好使用没有依赖关系的库。
bcrypt-nodejs 不再主动维护。请使用 bcrypt 或 bcryptjs,在这种情况下使用 bcryptjs,它对我有效