-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to build with AoT #10
Comments
Hello, I have the same problem here. Any solution? Kind regards, Damien |
Yup, me too - this makes the component unusable with current tools, no? |
I'm seeing the same issue. Any ideas for a workaround? |
Nothing? Any idea? |
Hi, after take a look i figured out how to make ng build --prod or ionic cordova build android --prod without errors. First i got all this errors, then the developer said the example worked fine, then I downloaded the 2.0.0 version, and really worked fine, for ng build --prod, here is my package versions Node: 8.9.1 @angular/cli: 1.6.0-rc.2 Then I just updated to the latest version, passing through 2.0.1 to 2.03 and kept working properly. After that I come to my app directory, replaced the node_modules/ng-canvas-gauges files for the one I build in example folder, and in app.module.ts i changed: import { GaugesModule } from 'ng-canvas-gauges'; to import { GaugesModule } from 'ng-canvas-gauges/src'; And did the same, updating to latest version as I did in example step. Then I copied all files from lib folder in example (.js, .map, .ts) and put in src folder in my app directory (node_modules/ng-canvas-gauges) and after that I could build with AoT with no errors. |
Hi, I'm getting the same issue: (directories replaced by /.../) Error: Unexpected value 'GaugesModule in /..../node_modules/ng-canvas-gauges/lib/index.d.ts' imported by the module 'AppModule in /..../src/app/app.module.ts'. Please add a @NgModule annotation. I'm using ng-canvas-gauges on a Ionic Project Here is my app,module.ts:
Ionic Info: cli packages: (/..../node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
Despite this issue when I try to build, I can debug on a real device without any problem. I'm trying to understand what @adsonvinicius did. Any guidance about this issue? Thank you |
Hi!
I'll first add that I'm very new to the javascript ecosystem, so forgive me if I get something wrong...
When I try and build my Angular project for production with AoT compiler, I get the following error:
ERROR in Unexpected value 'GaugesModule in C:/Users/<removed>/node_modules/ng-canvas-gauges/lib/index.js' imported by the module 'AppModule in C:/Users/<removed>/src/app/app.module.ts'. Please add a @NgModule annotation.
Going by this page: https://medium.com/@isaacplmann/getting-your-angular-2-library-ready-for-aot-90d1347bcad it seems hat you need to use another tool when building the package so that you have metadata?
Thanks!
The text was updated successfully, but these errors were encountered: