Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic 8.1.5 Demo7 Angular Version - Modals Module Error


Hi, do you have any idea why there's an error after adding ModalsModule in the app.module.ts.

Uncaught TypeError: Cannot read properties of undefined (reading 'ModalsModule')
at Module.ModalsModule (widgets.module.ts:231:28)
at 71706 (layout.module.ts:84:5)
at __webpack_require__ (bootstrap:19:1)
at 40789 (page-info.service.ts:17:21)
at __webpack_require__ (bootstrap:19:1)
at 9694 (tiles-widget14.component.html:20:71)
at __webpack_require__ (bootstrap:19:1)
at 85157 (tiles-widget3.component.html:4:23)
at __webpack_require__ (bootstrap:19:1)
at 76407 (widgets.module.ts:231:28)


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

I've checked your case, weird webpack behavior.
Anyway, for now try to change import from short to the full path: import { ModalsModule } from './_metronic/partials/layout/modals/modals.module'; and it should work.

Regards,
Keenthemes support



This suggestion helped to fix the bug/issue thank you for the help. Saved my day !!



Hi Royland Andrino,

Probably ModalsModule is already added to the layout.module.ts. We will check this further and provide you with a solution soon.

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(