francescov1 / mongoose-tsgen

A plug-n-play Typescript generator for Mongoose.
105 stars 25 forks source link

running the script says invalid tsconfig.json, but it is valid #106

Closed florianrubel closed 2 years ago

florianrubel commented 2 years ago

The output is: Error: Error parsing your tsconfig.json file, please ensure the format is valid

This is the tsconfig.json

{
    "compilerOptions": {
        "target": "esnext",
        "module": "CommonJS",
        "moduleResolution": "NodeNext",
        "strict": false,
        "sourceMap": true,
        "resolveJsonModule": true,
        "noUnusedLocals": false,
        "strictNullChecks": false,
        "lib": ["esnext", "dom"],
        "baseUrl": ".",
        "paths": {
            "~/*": ["src/*"]
        },
        "isolatedModules": false,
        "allowSyntheticDefaultImports": true,
        "esModuleInterop": true
    },
    "include": [
        "src/**/*.ts",
    ],
    "exclude": [
        "node_modules",
        ".vscode"
    ]
}
francescov1 commented 2 years ago

Hi @florianrubel, the error is due to a stray comma in your include array. If you change it to the following, it should fix the issue:

"include": [
       "src/**/*.ts"
],
florianrubel commented 2 years ago

Lol, you are right. The tsconfig validation tool didn't get that. Thx and sorry.