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
741 stars 173 forks source link

Unexpected value 'RoundProgressModule' imported by the module 'HomePageModule'. Please add a @NgModule annotation #144

Closed Sampath-Lokuge closed 6 years ago

Sampath-Lokuge commented 6 years ago

This is the error on Ionic 3 project.

This is the project on git: https://github.com/Sampath-Lokuge/svgapp

ERROR Error: Uncaught (in promise): Error: Unexpected value 'RoundProgressModule' imported by the module 'HomePageModule'. Please add a @NgModule annotation.
Error: Unexpected value 'RoundProgressModule' imported by the module 'HomePageModule'. Please add a @NgModule annotation.
    at syntaxError (vendor.js:78267)
    at vendor.js:92120
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (vendor.js:92103)
    at JitCompiler._loadModules (vendor.js:103538)
    at JitCompiler._compileModuleAndComponents (vendor.js:103511)
    at JitCompiler.compileModuleAsync (vendor.js:103440)
    at ModuleBoundCompiler.compileModuleAsync (vendor.js:103840)
    at vendor.js:66692
    at t.invoke (polyfills.js:3)
    at syntaxError (vendor.js:78267)
    at vendor.js:92120
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (vendor.js:92103)
    at JitCompiler._loadModules (vendor.js:103538)
    at JitCompiler._compileModuleAndComponents (vendor.js:103511)
    at JitCompiler.compileModuleAsync (vendor.js:103440)
    at ModuleBoundCompiler.compileModuleAsync (vendor.js:103840)
    at vendor.js:66692
    at t.invoke (polyfills.js:3)
    at c (polyfills.js:3)
    at Object.reject (polyfills.js:3)
    at NavControllerBase._fireError (vendor.js:43938)
    at NavControllerBase._failed (vendor.js:43926)
    at vendor.js:43981
    at t.invoke (polyfills.js:3)
    at Object.onInvoke (vendor.js:4248)
    at t.invoke (polyfills.js:3)
    at r.run (polyfills.js:3)
    at polyfills.js:3

package.json

{
  "name": "SvgApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.4.4",
    "@angular/compiler": "4.4.4",
    "@angular/compiler-cli": "4.4.4",
    "@angular/core": "4.4.4",
    "@angular/forms": "4.4.4",
    "@angular/http": "4.4.4",
    "@angular/platform-browser": "4.4.4",
    "@angular/platform-browser-dynamic": "4.4.4",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/storage": "2.0.1",
    "angular-svg-round-progressbar": "^1.2.0",
    "ionic-angular": "3.8.0",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.0.1",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project"
}
Sampath-Lokuge commented 6 years ago

@crisbeto It is working fine with this version: npm install angular-svg-round-progressbar@1.1.1 --save

I have upgraded above git repo to this version. So if you need to simulate it for latest then please remove this and use the latest version.

gelito commented 6 years ago

I have the same issue. I try with 1.1.1 and 1.2.0 without success.

My package.json

{
  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@angularclass/hmr": "^2.1.3",
    "angular-linkedin-sdk": "^0.1.7",
    "angular-svg-round-progressbar": "^1.1.1",
    "core-js": "^2.5.1",
    "npm-check": "^5.5.2",
    "rxjs": "^5.5.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.5.0",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.5",
    "@types/jasmine": "^2.6.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "^8.0.50",
    "angular2-chartjs": "^0.3.0",
    "angular2-google-place": "^2.0.2",
    "angular2-ladda": "^1.2.2",
    "angular2-toaster": "^4.0.1",
    "angular2-useful-swiper": "^5.0.1",
    "angular2-uuid": "^1.1.1",
    "codelyzer": "^4.0.1",
    "jasmine-core": "^2.8.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng2-page-scroll": "^4.0.0-beta.12",
    "ng2-smooth-scroll": "^1.0.1",
    "protractor": "^5.2.0",
    "stylelint": "^8.2.0",
    "stylelint-config-standard": "^17.0.0",
    "stylelint-order": "^0.7.0",
    "swiper": "^3.4.2",
    "ts-node": "^3.3.0",
    "tslint": "^5.8.0",
    "typescript": "^2.4.2"
  }
}
morrisonbrett commented 6 years ago

Same here:

v1.1.1 - Works with Angular 5 but not when doing a --prod build. Won't compile. v1.2.0 - Compiles on Angular 5, both dev and --prod builds, but during run-time gets the error in this issue.

Sampath-Lokuge commented 6 years ago

@gelito You need to remove ^ here. "angular-svg-round-progressbar": "^1.1.1", Like this the end "angular-svg-round-progressbar": "1.1.1",

morrisonbrett commented 6 years ago

I had to roll back to Angular 4 because of this issue. My entire project works flawlessly in Angular 5 - except for this component holding us up. It's a blocking issue for my team.

MickL commented 6 years ago

1.1.1 is working on Angular 4.3.6 If its a blocking issue you may do a pull request. Im assuming its an easy fix.

AndreasWJ commented 6 years ago

Same here. I'm using Angular 5.0.1. Unfortunantely v1.1.1 doesn't work for me either, it also gives me a compilation warning. Any ideas when an update comes that'll support Angular 5.0.1?

ghbob commented 6 years ago

So, I looked around and found this: https://stackoverflow.com/questions/45468663

Once i removed the node_modules/angular-svg-round-progressbar/node_modules directory both ng serve and ng build worked again. (Angular 5.0.0, progressbar 1.1.1)

morrisonbrett commented 6 years ago

@BOb511 this worked for me. I added this line a few times in our build process and we're back running (Angular 5.0.2, progressbar 1.1.1):

rm -rf node_modules/angular-svg-round-progressbar/node_modules

razor901 commented 6 years ago

I did the same as @morrisonbrett @ghbob did and it worked. One week later it stopped working .. there isn't even a node_modules/angular-svg-round-progressbar/node_modules folder there .. it is still deleted

EDIT : I uninstalled this module with v 1.1.1 and installed it again and it worked .

crisbeto commented 6 years ago

Should be fixed in the 1.2.1 release. Let me know if it still doesn't work and I'll reopen the issue.

rafaneri commented 6 years ago

@crisbeto the problem continues to occurs on iOS. The first run it works, but after, the problem occur again. captura de tela 2018-01-17 as 14 44 44 captura de tela 2018-01-17 as 14 49 31

mono-developer commented 6 years ago

I just got same issue.