我正在尝试安装discord.js使不和谐的机器人,我试图得到它,但我找不到一个方法。我能找到的只有npm i discord.js,但是有人告诉我bash: npm unknown command或者别的什么,请帮帮我。顺便说一下,我试着使用sudo apt-get install discord.js,但它显示为unknown package 'discord.js'。
$ npm i discord.js
bash: npm: command not found
$ sudo apt-get install discord.js
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package discord.js
E: Couldn't find any package by glob 'discord.js'
E: Couldn't find any package by regex 'discord.js'发布于 2020-06-07 07:33:49
discord.js不是一个可以从Debian package repositories安装的包。
正如其他人提到的,它是一个node.js模块,可以通过npm安装。但是,您似乎没有安装npm。
bash: npm:找不到命令
node.js可能是在没有npm的情况下安装的。我建议您尝试显式安装npm,然后运行npm init和npm i discord.js。
https://stackoverflow.com/questions/62237280
复制相似问题