请问这个错误怎么解决?
npm run dev
wechat-chatgpt@1.0.0 dev
nodemon --exec node --watch config.yaml --loader ts-node/esm src/main.ts
[nodemon] 2.0.20
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): config.yaml
[nodemon] watching extensions: ts
[nodemon] starting node --loader ts-node/esm src/main.ts
(node:4533) 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:133:18)
[nodemon] app crashed - waiting for file changes before starting...
1条答案
按热度按时间sulc1iza1#
升级最新版本的nodejs可以解决此问题