我正在try 运行 docker 文件本地化( node 类型脚本上的项目)
docker 文件
FROM node:20-alpine
EXPOSE 5000
MAINTAINER Some Dev
RUN mkdir /app
WORKDIR /app
COPY ./backend/* /app
RUN npm i
CMD ["npm","start"]
但我遇到了一个问题错误TS 18003:在配置文件"/app/tsmin.json"中找不到输入.指定的"包含"路径是"["./ SRC/","./ src/** /.ts","./src/.ts"]"和"排除"路径为"["./ dist"".
Tsconfig.json
{
"compilerOptions": {
"target": "ES2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"module": "commonJS", /* Specify what module code is generated. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"rootDir": "./src",/* Specify the root folder within your source files. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"removeComments": true, /* Disable emitting comments. */
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
"skipLibCheck": true
},
"include": [
"./src/",
"./src/**/*.ts",
"./src/*.ts"
],
"exclude": [
"./dist"
]
}
在包括、排除中try 了一些不同的事情.看到建议添加空ts文件并创建,但没有任何变化.重新启动IDE(FieldJ idea ).