dalestone / angular2-gantt

A gantt library written in angular
MIT License
67 stars 38 forks source link

Module build failed. "ng2-gantt/index.ts" is missing from the TypeScript compilation #36

Open umutc opened 6 years ago

umutc commented 6 years ago

Error:

ERROR in ./node_modules/ng2-gantt/index.ts
Module build failed: Error: /Users/umut/Desktop/magistum/ngapp/node_modules/ng2-gantt/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
    at AngularCompilerPlugin.getCompiledFile (/Users/umut/Desktop/magistum/ngapp/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:656:23)
    at plugin.done.then (/Users/umut/Desktop/magistum/ngapp/node_modules/@ngtools/webpack/src/loader.js:467:39)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7)
 @ ./src/app/app.module.ts 24:0-40
 @ ./src/main.ts
 @ multi ./src/main.ts

Angular Version:

Angular CLI: 1.6.5
Node: 9.3.0
OS: darwin x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.1.0
@angular/cli: 1.6.5
@angular/material: 5.1.0
@angular-devkit/build-optimizer: 0.0.41
@angular-devkit/core: 0.0.28
@angular-devkit/schematics: 0.0.51
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.5
@schematics/angular: 0.1.16
typescript: 2.6.2
webpack: 3.10.0
ismaele-bottelli commented 6 years ago

I've the same issue. Did you resolve this? @umutc

EDIT: I solve this adding the path to library from node modules in tsconfig.app.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "baseUrl": "./",
    "module": "es2015",
    "types": []
  },
  "include": [
    "./**/*",
    "../node_modules/ng2-gantt/index.ts"
  ],
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}