Skip to content

Error message with Angular Ivy #113

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

Closed
LaurentPlagne opened this issue May 2, 2020 · 4 comments
Closed

Error message with Angular Ivy #113

LaurentPlagne opened this issue May 2, 2020 · 4 comments

Comments

@LaurentPlagne
Copy link

Hello,
I am a newby user of both angular and Plotly hence forgive me if my question is not relevant.

I try to follow the instruction to use Plotly in an angular component and I get the followiing error message :
`ERROR in node_modules/angular-plotly.js/src/app/plotly/plotly.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

This likely means that the library (angular-plotly.js) which declares PlotlyModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Any hint ?`

@LaurentPlagne
Copy link
Author

Forgot to add the angular version
Angular CLI: 9.1.3
Node: 12.16.3
OS: linux x64

Angular: 9.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.3
@angular-devkit/build-angular 0.901.3
@angular-devkit/build-optimizer 0.901.3
@angular-devkit/build-webpack 0.901.3
@angular-devkit/core 9.1.3
@angular-devkit/schematics 9.1.3
@ngtools/webpack 9.1.3
@schematics/angular 9.1.3
@schematics/update 0.901.3
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0

@andrefarzat
Copy link
Collaborator

Hello @LaurentPlagne . I could not replicate it locally. Looks like is something new related to Ivy ( haven't tested anything about it yet ).
Let me ask you, did you followed the quick start on the README.md and used the regular PlotlyModule ?

@LaurentPlagne
Copy link
Author

Hello Andre,
thank you for your answer. I have restarted from scratch and followed the README steps an I ran into this (#75) bug. The change of target from es2015 to es5 solved it.
Thank you again

@timothyjhanson
Copy link

In package.json scripts object adding this key value pair fixed the issue for me.

"postinstall": "ngcc"

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

3 participants