Skip to content
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

node v20+ 启动服务报错的问题 #12

Open
ch98196 opened this issue May 24, 2024 · 1 comment
Open

node v20+ 启动服务报错的问题 #12

ch98196 opened this issue May 24, 2024 · 1 comment

Comments

@ch98196
Copy link

ch98196 commented May 24, 2024

node 20.x版本在执行npm start时出现报错信息

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for {PATH}\dingtalk-stream-sdk-nodejs-2.1.4\example\index.ts

package.json中的scripts.start值改为node --loader ts-node/esm example/index.ts即可

@ch98196
Copy link
Author

ch98196 commented May 24, 2024

另需要在tsconfig.json中将compilerOptions.modulecompilerOptions.moduleResolution修改为NodeNext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant