mdbootstrap / mdb-angular-ui-kit

Angular 18 & Bootstrap 5 & Material Design UI KIT
https://mdbootstrap.com/docs/angular/
Other
1.12k stars 282 forks source link

Unknown compiler option 'include' #31

Closed Sunil1890 closed 6 years ago

Sunil1890 commented 6 years ago

Srinis-MacBook-Pro:project-md-integration srini$ ng serve --open error TS5023: Unknown compiler option 'include'.

Error: error TS5023: Unknown compiler option 'include'.

at AngularCompilerPlugin._setupOptions (/Users/srini/Desktop/project-md-integration/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:90:19)
at new AngularCompilerPlugin (/Users/srini/Desktop/project-md-integration/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:43:14)
at _createAotPlugin (/Users/srini/Desktop/project-md-integration/node_modules/@angular/cli/models/webpack-configs/typescript.js:77:16)
at Object.getNonAotConfig (/Users/srini/Desktop/project-md-integration/node_modules/@angular/cli/models/webpack-configs/typescript.js:100:19)
at NgCliWebpackConfig.buildConfig (/Users/srini/Desktop/project-md-integration/node_modules/@angular/cli/models/webpack-config.js:33:37)
at Class.run (/Users/srini/Desktop/project-md-integration/node_modules/@angular/cli/tasks/serve.js:71:98)
at check_port_1.checkPort.then.port (/Users/srini/Desktop/project-md-integration/node_modules/@angular/cli/commands/serve.js:123:26)
at process._tickCallback (internal/process/next_tick.js:103:7
mdbootstrap commented 6 years ago

Could you please share your tsconfig file?

cmckni3 commented 6 years ago

Needs to be under the first level of tsconfig instead of compilerOptions.

{
  "compileOnSave": false,
  "include": ["node_modules/angular-bootstrap-md/**/*.ts",  "src/**/*.ts"],
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}
DebaratiMajumder commented 6 years ago

Please add below properties into tsconfig.json: "compileOnSave": false, "include": ["src/*/.ts"], "files": [ "src/app/mocked_data.ts" ], "compilerOptions": {...

Make sure to add these "include" and "files" properties before "compilerOptions". The "files" property should contain the path of the ts file within the project (which is src/app/mocked_data.ts in my example).