EN当我使用ts-node-dev时,导入的文件必须命名为"./api“或"./api.ts”,并且在构建项目时(使用tsc...
Added the --esm flag to the dev script: "dev": "ts-node-dev --esm src/index.ts" Tried replacing ts-node-dev with ts-node: ts-node --esm src/index.ts Still got this error : Compiled with tsc and ran the output with node, which worked fine. tsc /src/index.ts node dist/index...
tsc 会抱怨 require 不存在。提供 node 类型,或者用 declare 声明来消除错误。 - Blackus 2 完整答案,包括三种解决方案。 +1 - Offirmo 1 附加说明:只要在 tsconfig.json 中引用了类型索引,它甚至可以与 ts-node 一起使用。 - Offirmo 我对你所说的“声明它以丢弃错误”的意思感到困惑。我需要在我尝试导入...
RedYetiDev/nodejs-tsc-vote-demomain 1 Branch 0 Tags Code Folders and filesLatest commit RedYetiDev skip over invalid comments edc5337· May 31, 2024 History2 Commits .github/workflows skip over invalid comments May 31, 2024 dist Demonstration: Vote Bot via Github Actions May 30, 2024...
EN当我使用ts-node-dev时,导入的文件必须命名为"./api“或"./api.ts”,并且在构建项目时(使用tsc...
RedYetiDev / nodejs-tsc-vote-demo Public Notifications Fork 0 Star 0 Code Issues 1 Pull requests Actions Projects Security Insights TSC Vote Trigger TSC Vote Trigger #16 Sign in to view logs Summary Jobs main Run details Usage Workflow file ...