ngx-bootstrap: Module not found after update to v11
After updating to v.11 I can’t serve my project, getting “Failed to compile”. For every module I get a message like:
Module not found: Error: Can't resolve 'ngx-bootstrap/modal'.
I’m using a module for importing ngx-bootstrap components:
@NgModule({
declarations: [],
imports: [
AlertModule.forRoot(),
BsDropdownModule.forRoot(),
ModalModule.forRoot(),
TabsModule.forRoot(),
TooltipModule.forRoot(),
AccordionModule.forRoot(),
RatingModule.forRoot(),
TypeaheadModule.forRoot(),
PaginationModule.forRoot(),
ProgressbarModule.forRoot()
],
exports: [
AlertModule,
BsDropdownModule,
ModalModule,
TabsModule,
TooltipModule,
AccordionModule,
RatingModule,
TypeaheadModule,
PaginationModule,
ProgressbarModule
]
})
export class BootstrapImportModule { }
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 11.0.0
Angular: 16
Bootstrap: 5.2.3
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 13
- Comments: 22 (4 by maintainers)
v11.0.2 works for me, please try
#6599
This issue was closed, but I still have the same problem. Any recommendations?
finally, found it
I’ve updated to 11.0.1 but the same problem
Thanks @JasonWeinzierl I was not knowing much about these things. Was wondering about same until I found your comment and this reference for docs https://angular.io/guide/angular-package-format Is anyone working on a PR or raised any?
the same 😦
Unfortunately, v11.0.2 doesn’t yet fully solve the problem.
14 07 2023 08:21:49.963:INFO [karma-server]: Karma v6.4.1 server started at http://localhost:9876/ 14 07 2023 08:21:49.967:INFO [launcher]: Launching browsers ChromeHeadlessCustom with concurrency unlimited 14 07 2023 08:21:49.972:INFO [launcher]: Starting browser ChromeHeadless 14 07 2023 08:21:50.487:INFO [Chrome Headless 114.0.5735.133 (Linux x86_64)]: Connected on socket v_CBf7CMwfnW3AtKAAAB with id 91243169 Chrome Headless 114.0.5735.133 (Linux x86_64) ERROR Uncaught Error: Cannot find module ‘ngx-bootstrap/modal’ at http://localhost:9876/_karma_webpack_/main.js:114104:50
Error: Cannot find module ‘ngx-bootstrap/modal’ at webpackMissingModule (http://localhost:9876/_karma_webpack_/main.js:114104:50) at Module.78105 (http://localhost:9876/_karma_webpack_/main.js:114104:144) at webpack_require (http://localhost:9876/_karma_webpack_/webpack:/webpack/bootstrap:19:1) at Module.23475 (http://localhost:9876/_karma_webpack_/main.js:115209:80) at webpack_require (http://localhost:9876/_karma_webpack_/webpack:/webpack/bootstrap:19:1) at Module.53745 (http://localhost:9876/_karma_webpack_/main.js:115546:84) at webpack_require (http://localhost:9876/_karma_webpack_/webpack:/webpack/bootstrap:19:1) at Module.63708 (http://localhost:9876/_karma_webpack_/main.js:108525:88) at webpack_require (http://localhost:9876/_karma_webpack_/webpack:/webpack/bootstrap:19:1) at Module.51499 (http://localhost:9876/_karma_webpack_/main.js:102824:79)
ngx-bootstrap: 11.0.2 angular: 16.1
(there is no problem with ngx-bootstrap v9.0.0 from which I try to upgrade)
Perfect.
I’ve updated to 11.0.1 but the same problem
This fix works for me. Also there is the PR #6599 to fix it.
There’s something wrong with the “exports” paths in
node_modules/ngx-bootstrap/package.json. They seem to be pointing to folders which don’t exist.I was able to fix it locally by find-and-replacing fesm2020 with fesm2022.
Facing same issues. Was about to raise the same issue.