I couldn't find a recent question talking about this so I decided to create a new one.
I'm building some azure functions with Typescript and I'm getting:
import { Entity, BaseEntity, PrimaryColumn, Column, ManyToOne } from "typeorm";
SyntaxError: Cannot use import statement outside a module
This is my tsconfig
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "dist",
"rootDir": ".",
"sourceMap": true,
"esModuleInterop": true,
"strict": true,
"lib": [
"esnext"
],
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
}
}
Any ideas how to solve this? Thanks!