ChatGPT-wechat-bot icon indicating copy to clipboard operation
ChatGPT-wechat-bot copied to clipboard

请问在终端运行以下命令这一步具体怎么办啊

Open lycnb66 opened this issue 2 years ago • 5 comments

lycnb66 avatar Feb 06 '23 08:02 lycnb66

老是显示npm报错

lycnb66 avatar Feb 06 '23 08:02 lycnb66

[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 报错这个是为什么

ChenBaosu avatar Feb 06 '23 08:02 ChenBaosu

@lycnb66 可能是node版本问题 建议把node版本提升到16

AutumnWhj avatar Feb 07 '23 02:02 AutumnWhj

我使用cnpm 成功运行了

xxxcarl avatar Feb 08 '23 02:02 xxxcarl

Error: Invalid environment: global fetch not defined 还有这个问题的 需要将node 升级到18以上

xxxcarl avatar Feb 08 '23 03:02 xxxcarl