ts-node ignores d.ts files while tsc successfully compiles the project

前端 未结 4 584
伪装坚强ぢ
伪装坚强ぢ 2021-02-03 17:20

Having compiled my TypeScript project successfully, I intended to run it in VS Code\'s debug mode using ts-node. Problem is, ts-node can\'t find

4条回答
  •  失恋的感觉
    2021-02-03 18:01

    Here's How i fixed it. Add "nodemon --exec ts-node --files src/app.ts" to your dev script.

     "scripts": {
        "start": "node dist/app.js",
        "dev": "nodemon --exec ts-node --files src/app.ts",
        "build": "tsc -p",
        "test": "echo \"Error: no test specified\" && exit 1"
      },
    

提交回复
热议问题