francescov1 / mongoose-tsgen

A plug-n-play Typescript generator for Mongoose.
102 stars 24 forks source link

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

Closed florianrubel closed 1 year ago

florianrubel commented 1 year 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 1 year 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 1 year ago

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