angular-svg-round-progressbar icon indicating copy to clipboard operation
angular-svg-round-progressbar copied to clipboard

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

Open sriram5052 opened this issue 7 years ago • 11 comments

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

sriram5052 avatar Sep 05 '17 08:09 sriram5052

Hi,

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

igorissen avatar Sep 21 '17 13:09 igorissen

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

sriram5052 avatar Sep 22 '17 04:09 sriram5052

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.

morrisonbrett avatar Nov 02 '17 20:11 morrisonbrett

@morrisonbrett you are the real MVP

gattidaniel avatar Nov 06 '17 01:11 gattidaniel

bitmoji

morrisonbrett avatar Nov 06 '17 02:11 morrisonbrett

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

amarjeet89 avatar Nov 06 '17 10:11 amarjeet89

@amarjeet89 to solve it install v1.1.1 'npm install [email protected] --save'

gattidaniel avatar Nov 06 '17 10:11 gattidaniel

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?

epot avatar Nov 22 '17 07:11 epot

@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

ghbob avatar Nov 22 '17 11:11 ghbob

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

epot avatar Nov 22 '17 12:11 epot

Awesome!

thezakman avatar Nov 28 '17 22:11 thezakman