I am building a REST-Api with Express in Typescript and I am experiencing weird behavior from the Typescript-Compiler. Whenever I build the project via tsc -b
locally on my Windows-10 machine, everything compiles fine, but when i run the same command on the exact same project on an Amazon EC2 instance, nothing happens. I see no errors and the console is just doing nothing, until I exit out via CTRL+C. And no, I am not just impatient, letting it run for several minutes has no effect either. It gets even weirder as I am able to compile single files in the root of the project by running tsc index.ts
, but only if they are placed in the root folder. My tsconfig looks like that:
{
"compilerOptions": {
"lib": [
"es5",
"es6"
],
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./build",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"esModuleInterop": true
}
}
and the file structure of my project is:
package.json
package-lock.json
tsconfig.json
src/
app.ts
index.ts
routes/
entity/
My npm version is: 7.8.0 (on the Amazon EC2 Instance)
My typescript version is: 4.2.4 (on the Amazon EC2 Instance)