Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullInjectorError: No provider for Framework! #340

Open
1 of 5 tasks
AdamSundberg opened this issue Nov 16, 2022 · 1 comment
Open
1 of 5 tasks

NullInjectorError: No provider for Framework! #340

AdamSundberg opened this issue Nov 16, 2022 · 1 comment

Comments

@AdamSundberg
Copy link

Describe the bug
I'm using Angular 14's new feature 'standalone' components. When importing the JsonSchemaFormModule and using the json-scheme-form component in the template I get NullInjectorError (see attached file).

Error:
ERROR NullInjectorError: R3InjectorError(Standalone[PlaygroundComponent])[FrameworkLibraryService -> FrameworkLibraryService -> FrameworkLibraryService -> Framework -> Framework]:

  • MaterialDesignFrameworkModule — Material Design
  • Bootstrap3FrameworkModule — Bootstrap 3
  • Bootstrap4FrameworkModule — Bootstrap 4
  • NoFrameworkModule — plain HTML
  • Other (please specify below)

To Reproduce
Steps to reproduce the behavior:

  1. Install Angular 14
  2. Generate a standalone component
  3. Import the JsonSchemaFormModule
  4. Add the json-scheme-form to the component template
  5. Try to view it in the browser

Expected behavior
I expect to see the Json form.

Screenshots
The error:
image

The standalone component:
image

The component template:
image

Desktop (please complete the following information):

  • OS: macOS Monterey 12.6
  • Browser: Tested firefox and safari

Log output covering before error and any error statements

ERROR NullInjectorError: R3InjectorError(Standalone[PlaygroundComponent])[FrameworkLibraryService -> FrameworkLibraryService -> FrameworkLibraryService -> Framework -> Framework]: 
  NullInjectorError: No provider for Framework!
    Angular 5
    FrameworkLibraryService_Factory ajsf-core.mjs:2294
    Angular 8
    JsonSchemaFormComponent_Factory ajsf-core.mjs:2294
    Angular 5
    BlockConfigComponent_Template block-config.component.html:1
    Angular 12
    SidePanelEditorComponent_Template side-panel-editor.component.html:2
    Angular 23
    RxJS 6
    Angular 22
    BaseBlockComponent_HostBindings base-block.component.ts:14
    Angular 4
    CanvasComponent__svg_g_4_Template canvas.component.html:12
    Angular 13
    CanvasComponent_Template canvas.component.html:27
    Angular 23
[core.mjs:7635:22](webpack:///node_modules/@angular/core/fesm2020/core.mjs)
@LadaBr
Copy link

LadaBr commented Nov 20, 2022

Exactly same happens to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants