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

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

Open sriram5052 opened 7 years ago

sriram5052 commented 7 years ago

I have updated the packages to latest version of angular 4.4.0-RC.0. While running the application in browser it throws following error message.

I have imported RoundProgressModule in @NgModule. And it throws error in browser:

Package version "angular-svg-round-progressbar": "^1.1.0",

compiler.es5.js?524d:1694 Uncaught Error: Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. Please add a @NgModule annotation. at syntaxError (compiler.es5.js?524d:1694) at eval (compiler.es5.js?524d:15542) at Array.forEach () at CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js?524d:15525) at JitCompiler._loadModules (compiler.es5.js?524d:26958) at JitCompiler.compileModuleAndComponents (compiler.es5.js?524d:26931) at JitCompiler.compileModuleAsync (compiler.es5.js?524d:26860) at PlatformRef.bootstrapModuleWithZone (core.es5.js?de3d:4536) at PlatformRef.bootstrapModule (core.es5.js?de3d:4522) at Object.eval (main.ts?7d64:7) at eval (1020:11) at Object. (app.js:2724) at webpack_require (polyfills.js:55) at Object. (app.js:2716) at webpack_require (polyfills.js:55) at webpackJsonpCallback (polyfills.js:26) at app.js:1

igorissen commented 6 years ago

Hi,

I also get this error but only when I'm installing the module with yarn. When using npm it's work fine.

sriram5052 commented 6 years ago

I am using npm only , still the same error for angular 4.4.0-RC.0.

morrisonbrett commented 6 years ago

I'm seeing this now with Angular 5 and angular-svg-round-progressbar 1.2. angular-svg-round-progressbar 1.1.1 is working with Angular 5 and not throwing the error.

gattidaniel commented 6 years ago

@morrisonbrett you are the real MVP

morrisonbrett commented 6 years ago

bitmoji

amarjeet89 commented 6 years ago

Hi, After following the mention steps: npm install angular-svg-round-progressbar --save import {RoundProgressModule} from 'angular-svg-round-progressbar';

@NgModule({ imports: [RoundProgressModule] })

it throws error in browser: Uncaught Error: Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

My app uses anugular 4.1.3

gattidaniel commented 6 years ago

@amarjeet89 to solve it install v1.1.1 'npm install angular-svg-round-progressbar@1.1.1 --save'

epot commented 6 years ago

Forcing the version to 1.1.1 does not seem to work for me unfortunately. I am using angular 5.0.2 and getting the following error:

Uncaught Error: Unexpected value 'RoundProgressModule' imported by the module 'AppModule'. 
Please add a @NgModule annotation.
  at syntaxError (bundle.js:124529)
  at bundle.js:139152
  at Array.forEach (<anonymous>)
  at CompileMetadataResolver.getNgModuleMetadata (bundle.js:139135)
  at JitCompiler._loadModules (bundle.js:157564)
  at JitCompiler._compileModuleAndComponents (bundle.js:157525)
  at JitCompiler.compileModuleAsync (bundle.js:157441)
  at CompilerImpl.compileModuleAsync (bundle.js:123365)
  at PlatformRef.bootstrapModule (bundle.js:10480)
  at Object.hasOwn (bundle.js:114266)

Is there any other workaround?

ghbob commented 6 years ago

@epot this one can be fixed as mentioned here:
https://github.com/crisbeto/angular-svg-round-progressbar/issues/144#issuecomment-345732590 rm -rf node_modules/angular-svg-round-progressbar/node_modules

epot commented 6 years ago

Ah! I did not see the other issue, thanks!

thezakman commented 6 years ago

Awesome!