streamich / json-joy

JSON CRDT, JSON CRDT Patch, JSON Patch+, JSON Predicate, JSON Pointer, JSON Expression, JSON Type
https://jsonjoy.com/libs/json-joy-js
Apache License 2.0
740 stars 14 forks source link

Fails to import when using NodeNext resolution #694

Open arietrouw opened 2 weeks ago

arietrouw commented 2 weeks ago

Setting resolution to 'NodeNext' in a tsconfig project results in load failure. 16.9.x loads correctly. The problem seems to be that subsequent dependencies do not have a .js at the end of the import (node resolution). Would be great is a esm build of this was available that works with NodeNext.

arietrouw commented 2 weeks ago
image
arietrouw commented 2 weeks ago

This happens when importing from 'json-joy/lib/json-patch'

macmillen commented 2 weeks ago

Did you install all peer dependencies? See https://github.com/streamich/json-joy/issues/687#issuecomment-2275455632