-2

我制作了一个 Discord 机器人,我想将它托管在 Pi 上,但是一旦我让 node.js 工作,我就遇到了安装 npm 的墙,但依赖项不会随它一起下载。有人能帮我吗?

代码

pi@raspberrypi:~/bot $ npm i discord.js
npm WARN deprecated snekfetch@3.6.4: use node-fetch instead
npm WARN discord.js@11.1.0 requires a peer of bufferutil@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of erlpack@hammerandchisel/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of node-opus@^0.2.5 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of opusscript@^0.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of sodium@^2.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of libsodium-wrappers@^0.5.1 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.1.0 requires a peer of uws@^0.14.1 but none is installed. You must install peer dependencies yourself.
npm WARN greeter-bot@1.0.0 No repository field.
npm WARN greeter-bot@1.0.0 No license field.

+ discord.js@11.1.0
updated 1 package in 24.205s
4

2 回答 2

0

首先,我不建议在 Raspberry Pi 上托管 Discord 机器人,但为了与您的问题保持一致,我假设您坚持这样做。

你可以尝试两件事:

如果已apt安装,请运行命令apt install -a,它将安装先前输出中缺少的所有包。

第二种方法是手动安装它说丢失的软件包。

转到npm 存储库,搜索丢失的包,然后下载它在输出中请求的版本。

希望这可以帮助!

于 2020-02-06T20:16:21.000 回答
-1

好吧,我首先将我的电脑上的 npms 安装到特定文件夹,然后使用 Filezilla 传输它来修复它

于 2020-02-06T20:19:33.367 回答