1

/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,

8
  • show us some of your code, also is createComponent actually something that the angular/core package exports? Commented Aug 5, 2022 at 13:35
  • It was working fine if i remove import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap'; Commented 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#imports Commented 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. Commented 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 works Commented Aug 5, 2022 at 14:29

1 Answer 1

3

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]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.