You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.
Hi,
I am working on an Angular 9 application and trying to implement this component. But as soon as I add ImageViewerModule in app.module.ts, the application stops loading.
checklist-
added "iv-viewer": "2.0.1", "ng2-image-viewer": "^3.0.5" in package.json.
added "node_modules/ng2-image-viewer/imageviewer.scss" in Angular.json
added 'import { ImageViewerModule } from 'ng2-image-viewer'' in app.module.ts
As soon as I add ImageViewerModule in import section of app.module.ts, I am getting following error in browser console -
core.js:36228 Uncaught TypeError: Cannot read property 'id' of undefined
at registerNgModuleType (core.js:36228)
at core.js:36246
at Array.forEach ()
at registerNgModuleType (core.js:36242)
at new NgModuleFactory$1 (core.js:36407)
at compileNgModuleFactory__POST_R3__ (core.js:42296)
at PlatformRef.bootstrapModule (core.js:42663)
at Module../src/main.ts (main.ts:12)
at __webpack_require__ (bootstrap:79)
at Object.0 (polyfills.ts:52)
registerNgModuleType @ core.js:36228
(anonymous) @ core.js:36246
registerNgModuleType @ core.js:36242
NgModuleFactory$1 @ core.js:36407
compileNgModuleFactory__POST_R3__ @ core.js:42296
bootstrapModule @ core.js:42663
./src/main.ts @ main.ts:12
__webpack_require__ @ bootstrap:78
0 @ polyfills.ts:52
__webpack_require__ @ bootstrap:78
checkDeferredModules @ bootstrap:44
webpackJsonpCallback @ bootstrap:31
(anonymous) @ main.js:1
client:52 [WDS] Live Reloading enabled.
Hi,
I further found proper error message after enabling "aot:true" option in angular.json file .. and here is the error...
ERROR in node_modules/ng2-image-viewer/index.d.ts:3:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (ng2-image-viewer) which declares ImageViewerModule has not been processed correctly by ngcc,
or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
3 export declare class ImageViewerModule {
Hi,
I am working on an Angular 9 application and trying to implement this component. But as soon as I add ImageViewerModule in app.module.ts, the application stops loading.
checklist-
As soon as I add ImageViewerModule in import section of app.module.ts, I am getting following error in browser console -
note - package dependencies used
The text was updated successfully, but these errors were encountered: