node.js - 安装 NPM 包时遇到错误
问题描述
当我尝试通过 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
- 新PM
7.20.3
解决方案
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
推荐阅读
- php - 当我在其上设置密码时生成pdf附件空白
- mysql - 使用 MySQL 透视列值和标记
- python - 如何仅从 Python 列表中获取不是字符串的元素?
- excel - 如何使用 office-js-helpers 在 .NET Core 2.2 上使用 IdentityServer4 对 Excel Web 插件进行身份验证
- kubernetes - 在 istio 1.2.5 中创建 istio 入口网关时出错
- java - 如何将我的活动类文件发送到我的处理程序类文件编辑文本值
- reactjs - 从子中获得价值
- c++ - how to make compiz like page transition
- reactjs - Passing value from Children component to a Parent Component in React when Routing happens
- alexa - How can I reprompt the question for a slot if I only want synonyms