ChatGPT-wechat-bot
ChatGPT-wechat-bot copied to clipboard
请问在终端运行以下命令这一步具体怎么办啊
老是显示npm报错
[email protected] dev /www/wwwroot/ChatGPT/ChatGPT-wechat-bot-master node --loader ts-node/esm --inspect ./src/index.ts
Debugger listening on ws://127.0.0.1:9229/aea31fe9-5797-490c-a5a8-cae5de935f8c
For help, see: https://nodejs.org/en/docs/inspector
(node:14121) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: node --loader ts-node/esm --inspect ./src/index.ts
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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/2023-02-06T08_30_37_863Z-debug.log 报错这个是为什么
@lycnb66 可能是node版本问题 建议把node版本提升到16
我使用cnpm 成功运行了
Error: Invalid environment: global fetch not defined 还有这个问题的 需要将node 升级到18以上