node.js - npm:npm 错误!在 node-pty@0.6.10 安装脚本中失败。安装 Node OS 和 node-gyp 时
问题描述
我正在尝试创建一个 Node OS 发行版,在安装其命令行依赖项后,运行“npm install”会导致以下错误。
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/nodejs/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.72-microsoft-standard-WSL2
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/vinny/NodeOS/node_modules/node-pty
gyp ERR! node -v v10.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.6.10 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.6.10 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-02-26T23_32_45_386Z-debug.log
如您所知,我正在运行 WSL,并且安装了 VcXsrv 并且工作正常,所以不用担心。
但是如何成功安装 node-gyp?提前致谢!
解决方案
推荐阅读
- python - Django url 问题没有加载我的 html 模板
- reactjs - 我无法使用 getDerivedStateFromProps 更新状态
- java - 在Android中拖动recyclerview项目时在溢出前开始滚动
- python - 如何使用 pd.read_csv() 下载嵌入为图像的文件?
- c - 如何将器官添加到C中链表中的特定位置
- php - 重命名键名codeigniter
- ruby-on-rails - 带有设计的 icalendar gem 的问题
- visual-studio-code - VSCode中的自定义不可见字符渲染?
- python - welcoming new members, member has no attribute 'server'
- amazon-elastic-beanstalk - Upload Source Code larger than 512 mb to AWS Elastic Beanstalk