/node_modules/@ng-bootstrap/ng-bootstrap/fesm2020/ng-bootstrap.mjs:17281:25-40 - Error: export 'createComponent' (imported as 'createComponent') was not found in '@angular/core' (possible exports: ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule,
-
show us some of your code, also is createComponent actually something that the angular/core package exports?SomeStudent– SomeStudent2022-08-05 13:35:12 +00:00Commented Aug 5, 2022 at 13:35
-
It was working fine if i remove import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';athi– athi2022-08-05 13:37:09 +00:00Commented Aug 5, 2022 at 13:37
-
In your module where your component is defined, or in the app.module file, are you importing either the whole ng bootstrap module with NgbModule or individually as is referenced here ng-bootstrap.github.io/#/getting-started#importsSomeStudent– SomeStudent2022-08-05 13:39:40 +00:00Commented Aug 5, 2022 at 13:39
-
I have imported in app.module. The complete NgbModule as below. import { NgbModule } from '@ng-bootstrap/ng-bootstrap'. Am trying to implement modal popup.athi– athi2022-08-05 13:51:45 +00:00Commented Aug 5, 2022 at 13:51
-
Hmmm, I would say try following their stackblitz. That said I will say their documentation is genuinely shit since following their exact steps in my own stackblitz did not result in any of what they showed stackblitz.com/run?file=src%2Fmain.ts. Instead I will direct you to material components for angular and their dialog is pretty much the same concept, but it actually worksSomeStudent– SomeStudent2022-08-05 14:29:59 +00:00Commented Aug 5, 2022 at 14:29
|
Show 3 more comments
1 Answer
The same thing was happening to me, but for some reason when I downgraded bootstrap to version 12.1.2 it somehow worked.
npm i @ng-bootstrap/[email protected]