TSC 2307-打字稿-在heroku上部署时找不到模块

时间:2020-05-15 01:40:49

标签: node.js typescript

我有一个nodejs打字稿项目,可以在本地计算机上正常工作,但是当我部署到heroku或发送到travis CI时,它会向我显示此错误。

运行tsc命令后: tsc。

有帮助吗?

----->构建 运行构建(纱线) 纱线运行v1.22.4 $ rm -rf ./dist $ tsc -p。 src / b-controllers / token / token.controller.ts(14,19):错误TS2307:找不到模块“ ../../d-domain/entities/token”或其相应的类型声明。 src / b-controllers / user / user.controller.ts(17,18):错误TS2307:找不到模块“ ../../d-domain/entities/user”或其对应的类型声明。

我的tsconfig:

{
    "compilerOptions": {
        "target": "es6",        
        "module": "commonjs",        
        "moduleResolution": "node",        
        "outDir": "./dist",
        "allowSyntheticDefaultImports": true,
        "sourceMap": true,
        "esModuleInterop": true,
        "strict": true,
        "noImplicitAny": false,
        "skipLibCheck": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "allowJs": true
    }
}

0 个答案:

没有答案