Closed kuenstl closed 7 years ago
Me too! got same error when following script is executed:
ng build --prod -vc false -oh none
Needs help!
It seems that this issue is generic for the AOT, I spent some time looking into the source and the possible solutions and it seems it will remain for some time.
There is the same issue opened on the Angular repo - https://github.com/angular/angular/issues/15890 I will keep looking for that thread until people will find the ability to resolve it.
Same issue :( ng build --prod fails.... Any news?
Also cant add internalization throws same error
./node_modules/.bin/ng-xi18n
Finally, this is fixed with latest library release, to bypass AOT compilations I had to wrap components into the ng module, so this release contains breaking changes. The example project lists how to properly add components to project now.
Are you sure it's solved?
I reproduced this steps and the example project did not worked properly as you said.
I had the same error during run-time.
I solved it by deleting the node_modules
folder inside \node_modules\ng-canvas-gauges\
sharing my workaround to build in production under angular5
1) change component.js
old
exports.GaugesModule = require('./lib/gauges-module').GaugesModule;
new
exports.RadialGaugeComponent = require('./lib/radial-gauge').RadialGaugeComponent;
exports.LinearGaugeComponent = require('./lib/linear-gauge').LinearGaugeComponent;
2) when build, in production mode, use the following option ng build --prod --aot=false
Probably, there is a better way, but this is my work around.
When using the example "gauge-demo" of this repository (MeetmeLeave/ng-canvas-gauges/example), and building the example for producation the Angular CLI throws the following error:
Cmd:
ng build --prod
Output: