0

当我尝试通过 NPM 安装 bcrypt 时,出现此错误:

npm ERR! code 127
npm ERR! path Z:\Authentication-Service\node_modules\bcrypt
npm ERR! command failed
npm ERR! command bash -c node-pre-gyp install --fallback-to-build
npm ERR! /mnt/z/Authentication-Service/node_modules/.bin/node-pre-gyp: 11: exec: node: not found

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Xandrrrr\AppData\Local\npm-cache\_logs\2021-08-23T23_15_39_915Z-debug.log

我已经尝试过的:

  • 重新安装节点
  • 验证路径变量

我的版本:

  • 节点v16.7.0
  • 新PM7.20.3
4

1 回答 1

0

Node v16.7.0 is not the LTS version.

May be it has deprecated some features that bcrypt requires (but I'm not sure)!

Try downgrading Node to the current LTS version v14.17.6

于 2021-09-02T15:10:09.480 回答