You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an NPM module compiled with ngc which uses amcharts2-angular2 in the standard way, i.e.
import { AmChartsModule } from 'amcharts3-angular2';
Yet, when I compile it, I receive errors like that:
Error File 'd2-core/node_modules/amcharts3-angular2/index.ts' is not under 'rootDir' 'd2-core/modules/d2-charts'.
'rootDir' is expected to contain all source files.
OK, that seems to be caused by having an index.ts next to compiled index.js. By default the compiler resolve .ts file and thus tries to compile it. And then the error is totally, that file is outside of my module's rootDir.
When I remove the .ts file, I get another error:
Error at /Users/ryzy/Projects/d2-core/modules/d2-charts/src/charts.module.ts:3:32: Could not find a declaration file for module 'amcharts3-angular2'. '/Users/ryzy/Projects/d2-core/node_modules/amcharts3-angular2/index.js' implicitly has an 'any' type.
Again, it's totally valid. There's no .d.ts and no metadata for compiler.
We should include them in compiled version of the module.
The text was updated successfully, but these errors were encountered:
ryzy
changed the title
Error while comiling: amcharts3-angular2/index.ts' is not under 'rootDir'
Error while compiling: amcharts3-angular2/index.ts' is not under 'rootDir'
Apr 13, 2017
Hi,
I have an NPM module compiled with
ngc
which usesamcharts2-angular2
in the standard way, i.e.Yet, when I compile it, I receive errors like that:
OK, that seems to be caused by having an
index.ts
next to compiledindex.js
. By default the compiler resolve .ts file and thus tries to compile it. And then the error is totally, that file is outside of my module'srootDir
.When I remove the .ts file, I get another error:
Again, it's totally valid. There's no .d.ts and no metadata for compiler.
We should include them in compiled version of the module.
The text was updated successfully, but these errors were encountered: