我正在尝试编写一个Discord机器人,该机器人可以使人们下棋。我已经完成了源代码的编写,并且可以确定其中没有语法错误(我已经通过在线js
检查器进行了检查)。在终端中,我运行了命令npm install node app.js
。我在下面得到了以下重要信息。结果,当我node app.js
使我的机器人在线并进行适当的操作时,它失败了。
错误:
npm WARN deprecated express@2.5.9: express 2.x series is deprecated
npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated
npm WARN deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/daniel/Desktop/discord bot/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/daniel/Desktop/discord bot/node_modules/contextify
gyp ERR! node -v v14.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN notsup Unsupported engine for express@2.5.9: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"14.8.0","npm":"6.14.7"})
npm WARN notsup Not compatible with your version of node/npm: express@2.5.9
npm WARN discord.js@11.3.2 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.3.2 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN chessbot@0.0.1 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! contextify@0.1.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 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! /Users/daniel/.npm/_logs/2020-08-21T20_14_21_590Z-debug.log