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

An error occurs when "import" on v2.0.0 #149

Open
pouu69 opened this issue Jan 7, 2025 · 0 comments
Open

An error occurs when "import" on v2.0.0 #149

pouu69 opened this issue Jan 7, 2025 · 0 comments

Comments

@pouu69
Copy link

pouu69 commented Jan 7, 2025

Describe the bug

  • If you use version 2.0.0 after installing, an import error occurs.

To Reproduce
N/A

Expected behavior
It must be able to import JsonEditorComponent.

Console and Error stack trace

ERROR TypeError: (jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache || jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache) is not a constructor
image
// module.js
@NgModule({
 import: [
  // ...
  NgJsonEditorModule
  // ...
  ]
})

// component.js

import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';

export class EditorComponent implements OnInit, OnDestroy{
  // ...
   @ViewChild(JsonEditorComponent, { static: false }) editor: JsonEditorComponent;
   editorOptions = new JsonEditorOptions();
   editorData: any;
  // ...
}
<json-editor [debug]="false" [options]="editorOptions" [(ngModel)]="editorData"></json-editor>

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser : Chrome
  • Ng Version: 14.1.11
  • Angular Version: "~13.3.11"

Additional context

I think, can't load below module.
image

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

1 participant