Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while compiling: amcharts3-angular2/index.ts' is not under 'rootDir' #29

Closed
ryzy opened this issue Apr 13, 2017 · 0 comments
Closed

Comments

@ryzy
Copy link
Contributor

ryzy commented Apr 13, 2017

Hi,

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.

@ryzy 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
@Pauan Pauan closed this as completed in #32 Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant