crisbeto / angular-svg-round-progressbar

Angular module that uses SVG to create a circular progressbar
https://crisbeto.github.io/angular-svg-round-progressbar/
MIT License
742 stars 173 forks source link

Compiling with --prod does not work #129

Closed johanlantz closed 7 years ago

johanlantz commented 7 years ago

When trying to compile our project with --prod (ionic cordova build ios --prod) I get the following errors for this module:

Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /Users/yc00025/projects/bdd-app/node_modules/angular-svg-round-progressbar/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in /Users/yc00025/projects/bdd-app/node_modules/angular-svg-round-progressbar/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in /Users/yc00025/projects/bdd-app/node_modules/angular-svg-round-progressbar/node_modules/@angular/core/src/di/opaque_token.d.ts

Removing the RoundProgressBar from the project makes everything else compile ok in production mode.

crisbeto commented 7 years ago

What version of Angular are you running? The stack trace is referencing the OpaqueToken which has been deprecated for a few versions now.

johanlantz commented 7 years ago

Thanks for the quick reply. I am just getting started so I might be missing something obvious.

I am using angular through ionic and this is the info in the package.json.

"dependencies": { "@angular/common": "4.1.2", "@angular/compiler": "4.1.2", "@angular/compiler-cli": "4.1.2", "@angular/core": "4.1.2", "@angular/forms": "4.1.2", "@angular/http": "4.1.2", "@angular/platform-browser": "4.1.2", "@angular/platform-browser-dynamic": "4.1.2", "@angular/platform-server": "4.1.2",

Does that help?

crisbeto commented 7 years ago

Thanks. That Angular version seems fine. What version of the progress bar are you using?

johanlantz commented 7 years ago

This is what is in package.json "angular-svg-round-progressbar": "1.0.7",

crisbeto commented 7 years ago

Can you try updating it to 1.1.0? That's the version that supports Angular 4+.

crisbeto commented 7 years ago

@johanlantz did you manage to sort it out?

johanlantz commented 7 years ago

Hi

Sorry for the delay. I just got around to test this and it seems ok with the 1.1.0 version.

Many thanks for the help.