Skip to content

Unable to import jsonpatch - version 0.6.0 #356

@slubowsky

Description

@slubowsky

In typescript (angular) application had been patching version 0.5.0 to include missing jsonpatch in exported formatters and was importing like this:
import { DiffPatcher, formatters } from 'jsondiffpatch';
and all was good. (tsconfig has esModuleInterop set to true)

Now after update to 6.0 not sure how to import. Either of these seems to compile but crashes when try to run:

import { format, Op } from 'jsondiffpatch/lib/formatters/jsonpatch';
import * as jsonpatch from 'jsondiffpatch/lib/formatters/jsonpatch';

npm start
...
Application bundle generation complete. [3.149 seconds]
An unhandled exception occurred: Missing "./lib/formatters/jsonpatch" specifier in "jsondiffpatch" package
See "C:\Users\me\AppData\Local\Temp\ng-bKtu3M\angular-errors.log" for further details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions