plantain-00 / schema-based-json-editor

A reactjs and vuejs component of schema based json editor.
MIT License
168 stars 38 forks source link

Angular4 - ERROR in JSONEditorComponent is not an NgModule #2

Closed vrudikov closed 7 years ago

vrudikov commented 7 years ago

Tried to test it with Angular 4 and got this error on 'ng serve' here is full errors stack: ERROR in /Users/val.rudi/Documents/Nodejs/aero-admin/node_modules/schema-based-json-editor/typings/lib.d.ts (2,24): Cannot find module 'react'.

ERROR in /Users/val.rudi/Documents/Nodejs/aero-admin/node_modules/schema-based-json-editor/dist/common.d.ts (1,1): Cannot find type definition file for 'react'.

ERROR in /users/val.rudi/documents/nodejs/aero-admin/node_modules/@types/lodash/index.d.ts (19449,15): All declarations of 'WeakMap' must have identical type parameters.

ERROR in JSONEditorComponent is not an NgModule

plantain-00 commented 7 years ago

v3.7.4 should fix your 1st and 2nd error your 3rd error seems not from this component you should declare this component to fix your 4th error, eg: https://github.com/plantain-00/schema-based-json-editor/blob/master/demo/angular/index.ts#L94

vrudikov commented 7 years ago

Wow! So fast! Thank you. Awesome. I fixed all 4 errors.

Have you thinked about introducing the Angular module? So all declaration logic goes there and the only thing we need is to import the module

plantain-00 commented 7 years ago

Generally, this module should not do that, because users may have used a version of angular(eg 4.1.0) that will be in conflict with the included angular(eg 4.2.0).

vrudikov commented 7 years ago

Got it. Right