RexSkz / json-diff-kit

A better JSON differ & viewer, support LCS diff for arrays and recognise some changes as "modification" apart from simple "remove"+"add".
https://json-diff-kit.js.org
MIT License
138 stars 12 forks source link

Getting build errors occurring in my environment with this code #5

Closed masordi closed 1 year ago

masordi commented 2 years ago

I pulled in v1.0.8 of this diff tool and then did a build and the build failed with a number of errors (below). I'm looking for how I can get this code to work in my environment which uses Angular 7, typescript 3.2.2 and node v10.17.0. I looked around for what minimum version of typescript and/or node would work but could not find that information.

npm run build:prod


ERROR in node_modules/json-diff-kit/typings/differ.d.ts(93,68): error TS1005: ']' expected. node_modules/json-diff-kit/typings/differ.d.ts(93,80): error TS1005: ';' expected. node_modules/json-diff-kit/typings/differ.d.ts(93,82): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(3,1): error TS1128: Declaration or statement expected. node_modules/json-diff-kit/typings/index.d.ts(3,13): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(3,52): error TS1109: Expression expected. node_modules/json-diff-kit/typings/index.d.ts(3,59): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(4,1): error TS1128: Declaration or statement expected. node_modules/json-diff-kit/typings/index.d.ts(4,13): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(4,57): error TS1109: Expression expected. node_modules/json-diff-kit/typings/index.d.ts(4,64): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(5,1): error TS1128: Declaration or statement expected. node_modules/json-diff-kit/typings/index.d.ts(5,13): error TS1005: ';' expected. node_modules/json-diff-kit/typings/index.d.ts(5,28): error TS1109: Expression expected. node_modules/json-diff-kit/typings/index.d.ts(5,35): error TS1005: ';' expected. node_modules/json-diff-kit/typings/viewer.d.ts(2,13): error TS1005: '=' expected. node_modules/json-diff-kit/typings/viewer.d.ts(2,33): error TS1005: ';' expected. node_modules/json-diff-kit/typings/viewer.d.ts(3,13): error TS1005: '=' expected. node_modules/json-diff-kit/typings/viewer.d.ts(3,40): error TS1005: ';' expected. node_modules/json-diff-kit/typings/viewer.d.ts(56,33): error TS1005: ']' expected. node_modules/json-diff-kit/typings/viewer.d.ts(56,35): error TS1131: Property or signature expected. node_modules/json-diff-kit/typings/viewer.d.ts(56,46): error TS1011: An element access expression should take an argument. node_modules/json-diff-kit/typings/viewer.d.ts(56,47): error TS1005: ';' expected. node_modules/json-diff-kit/typings/viewer.d.ts(58,12): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(60,14): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(61,21): error TS1005: ',' expected. node_modules/json-diff-kit/typings/viewer.d.ts(62,24): error TS1005: ',' expected. node_modules/json-diff-kit/typings/viewer.d.ts(63,24): error TS1005: ',' expected. node_modules/json-diff-kit/typings/viewer.d.ts(66,17): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(68,25): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(70,23): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(75,24): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(77,15): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(79,11): error TS1109: Expression expected. node_modules/json-diff-kit/typings/viewer.d.ts(80,1): error TS1128: Declaration or statement expected.

RexSkz commented 2 years ago

Hello, there's no version limitation for Node.js, but the TypeScript version should be at least 3.8 due to the Type-Only Imports and Export feature.