HigorSilvaRosa / ng-organization-chart

This is a simple Angular 2/4 component that you can use to render organization charts.
https://ng-organization-chart.firebaseapp.com/
16 stars 14 forks source link

Module build failed: Error #6

Open bambam2174 opened 6 years ago

bambam2174 commented 6 years ago

After I've added NgOrganizationChartModule in my kbm.module.ts (corresponds to app.module.ts), by importing with import { NgOrganizationChartModule } from 'ng-organization-chart/src/ng-organization-chart/ng-organization-chart.module'; and adding to imports: [..] I got following error message when compiling

ERROR in ./node_modules/ng-organization-chart/src/ng-organization-chart/ng-organization-chart.module.ts
Module build failed: Error: /Users/sedatkilinc/Projects/Hybrid/kbmprot/azimuth/node_modules/ng-organization-chart/src/ng-organization-chart/ng-organization-chart.module.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/sedatkilinc/Projects/Hybrid/kbmprot/azimuth/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:709:23)
    at plugin.done.then (/Users/sedatkilinc/Projects/Hybrid/kbmprot/azimuth/node_modules/@ngtools/webpack/src/loader.js:41:31)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Is there any example code, how to do it best practice? The only sample I've found to get it run is this repo. But the import of the package is made by the file path, instead of writing the package name.

bambam2174 commented 6 years ago

At least it works when using the source code of ng-organization-chart instead of installing it as npm package.