-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行报错 #40
Comments
尝试
然后运行程序看是否可以启动,如果不行继续向下尝试
如果依然有问题,在此issues下回复 |
还是报这个错那 |
npx ts-node --version 查看一下ts-node的版本号 |
是不是ts-node和 swc/core版本不匹配 大佬 |
看提示信息是这样的,我现在没有环境验证,可以再运行以下 npm update @swc/core ts-node 试试 |
好的我再看下 谢谢 |
npm i @swc/[email protected] |
由于@swc/core升级导致的一个bug,2.0.16之前需运行 npm i @swc/[email protected] 更新依赖,之后版本以修复此问题 |
PS D:\gitWorkSpace\chatflow-main> npm run start
D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\transpilers\swc.ts:262
throw new Error(
^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"decorators":true,"dynamicImport":true,"importAssertions":true},"target":"es2022","transform":{"decoratorMetadata":true,"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}}
Caused by:
unknown field
keepImportAssertions
, expected one ofplugins
,keepImportAttributes
,emitAssertForImportAttributes
,cacheRoot
,disableBuiltinTransformsForInternalTesting
at line 1 column 438at createVariant (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\transpilers\swc.ts:262:13)
at createSwcOptions (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\transpilers\swc.ts:211:25)
at create (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\transpilers\swc.ts:56:41)
at createTranspiler (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\index.ts:784:16)
at createTranspileOnlyGetOutputFunction (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\index.ts:1341:28)
at createFromPreloadedConfig (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\index.ts:1404:34)
at create (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\index.ts:624:10)
at register (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\index.ts:591:15)
at Object.registerAndCreateEsmHooks (D:\gitWorkSpace\chatflow-main\node_modules\ts-node\src\esm.ts:116:34)
at file:///D:/gitWorkSpace/chatflow-main/node_modules/ts-node/esm.mjs:8:7
The text was updated successfully, but these errors were encountered: