首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装webtorrent-hybrid - node-pre-gyp:找不到命令

无法安装webtorrent-hybrid - node-pre-gyp:找不到命令
EN

Stack Overflow用户
提问于 2021-03-27 01:04:42
回答 1查看 146关注 0票数 0

我正在尝试安装webtorrent- build来构建一个电子p2p应用程序。我使用vue ui是因为应用程序将使用vue来管理前端内容,并且我已经成功地创建了一个使用vue-cli-plugin-electron-builder rc-6、Vue 3和node v15.4.0的新项目。vue cli插件安装的Electron版本是11.0。无论如何,当我尝试安装webtorrent- error时,我总是在终端中得到这个错误

代码语言:javascript
复制
npm ERR! code 1
npm ERR! path /Users/dev/Sites/wtorrent-electron/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c node scripts/download-prebuilt.js
npm ERR! /bin/sh: node-pre-gyp: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dev/.npm/_logs/2021-03-26T16_40_51_717Z-debug.log
command failed: npm install --loglevel error webtorrent-hybrid --legacy-peer-deps

有没有办法修复它,这样我就可以安装库了?如果不能解决这个问题,有没有在电子应用中使用webtorrent的替代方案?

EN

回答 1

Stack Overflow用户

发布于 2021-03-31 01:14:17

尝试节点14 (当前的lts),它有更好的预构建,如果没有,使用命令npm install --unsafe-perm=true应该可以做到这一点。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66821339

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档