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

Errors moving to Angular 5 with AngularCli from a working Angular 4 project #15

Open
ste4net opened this issue Jan 18, 2018 · 3 comments

Comments

@ste4net
Copy link

ste4net commented Jan 18, 2018

Hello,
As in subject i found error moving from Angular 4.2.5 working project to Angular ^5.0.0 in AngularCli.
2 Warnings and 1 Error
Error:
Uncaught Error: Unexpected value 'GaugesModule' imported by the module 'DashModule'. Please add a @NgModule annotation.
Change from import { GaugesModule } from 'ng-canvas-gauges/lib';
to import { GaugesModule } from 'ng-canvas-gauges/src';
generate other errors.

Warnings:

./node_modules/ng-canvas-gauges/node_modules/@angular/core/@angular/core.es5.js
5659:15-36 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/ng-canvas-gauges/node_modules/@angular/core/@angular/core.es5.js
 @ ./node_modules/ng-canvas-gauges/lib/index.js
./node_modules/ng-canvas-gauges/node_modules/@angular/core/@angular/core.es5.js
5675:15-102 Critical dependency: the request of a dependency is an expression
 @ ./node_modules/ng-canvas-gauges/node_modules/@angular/core/@angular/core.es5.js
 @ ./node_modules/ng-canvas-gauges/lib/index.js
@msantacruz
Copy link

Same error with Angular ^5.2.0

@lostation
Copy link

Same here... solution ?

@erickyi2006
Copy link

erickyi2006 commented Apr 27, 2018

for angular 5, it did not build the GaugesModule in the lib. Instead I modified component.js to explicitly include the two sub components

old
exports.GaugesModule = require('./lib/gauges-module').GaugesModule;
new

exports.RadialGaugeComponent = require('./lib/radial-gauge').RadialGaugeComponent;
exports.LinearGaugeComponent = require('./lib/linear-gauge').LinearGaugeComponent;

See also Issue 3 if you want to build in prod mode

*** updates ***
oops. forgot to mention. after i run the initial build (npm install), i removed the node_modules/ng-canvas-gauges/node_modules. then i proceeded to modify the above.

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

4 participants