mariohmol / ang-jsoneditor

Angular Jsoneditor that works with angular 4 to angular 15
https://stackblitz.com/edit/angular-json-editor
MIT License
156 stars 89 forks source link

TypeError: (jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache || jsoneditor__WEBPACK_IMPORTED_MODULE_0___namespace_cache) is not a constructor #113

Closed trashersmashercoolguy closed 1 year ago

trashersmashercoolguy commented 1 year ago

Got an error at version 2.0.0. at 1.10.5 everything is fine TypeError: (jsoneditorWEBPACK_IMPORTED_MODULE0namespace_cache || jsoneditorWEBPACK_IMPORTED_MODULE0namespace_cache) is not a constructor at JsonEditorComponent.ngOnInit (ang-jsoneditor.mjs:71:23) at callHook (core.mjs:2491:22) at callHooks (core.mjs:2460:17) at executeInitAndCheckHooks (core.mjs:2411:9) at refreshView (core.mjs:11971:21) at refreshComponent (core.mjs:13030:13) at refreshChildComponents (core.mjs:11746:9) at refreshView (core.mjs:12006:13) at refreshEmbeddedViews (core.mjs:12984:17) at refreshView (core.mjs:11980:9)

Stankman commented 1 year ago

It doesnt work on latest Angular

teamz-marcos commented 1 year ago

It seems like doesn't work in angular 12

lhqmcy commented 1 year ago

It's all the same to me.


C:\test>ng version

Angular CLI: 14.2.5 Node: 16.13.2 Package Manager: npm 8.19.2 Angular:

Package Version

@angular-devkit/architect 0.1402.5 (cli-only) @angular-devkit/core 14.2.5 (cli-only) @angular-devkit/schematics 14.2.5 (cli-only) @schematics/angular 14.2.5 (cli-only)

meenalgupta23 commented 1 year ago

any update about it? I'm also getting the same issue

martinpeterek commented 1 year ago

Any updates with updating to latest version of angular?

trentprynn commented 1 year ago

fwiw I'm running the following dependency versions and everything is playing nice except for some warnings during dependency installation

node: 16.14.2 angular: ~15.2.1 ang-jsoneditor: 1.10.5

attempting to upgrade to ang-jsoneditor@2.0.0 causes errors

faraz-ahmad-uft commented 1 year ago

I am getting the same error when I upgraded it to 2.0.0. Is there any solution of this error?

john8329 commented 1 year ago

Yup same. Package is unmaintained as of today.

JuamBer commented 1 year ago

Same issue here with this config:

Angular CLI: 15.1.4 Node: 18.12.1 Package Manager: npm 8.19.2 OS: win32 x64

ssougnez commented 1 year ago

I don't have time for a PR but the author just needs to update its json-editor import in:

import editor from 'jsoneditor';

And this will work.

kkovac1 commented 1 year ago

Any updates on this? How am I supposed to use package with Angular v16? Any soultions?

mariohmol commented 1 year ago

Thanks @ssougnez, will give it a try now

faraz-ahmad-uft commented 1 year ago

@mariohmol Any update on this?

mariohmol commented 1 year ago

released on v3.0.0, thanks a lot!