-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
Actual
inexplicitly
import {compare} from 'fast-json-patch'
console.log({compare})import {compare} from 'fast-json-patch'
^^^^^^^
SyntaxError: Named export 'compare' not found. The requested module 'fast-json-patch' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'fast-json-patch';
const {compare} = pkg;explicitly
import {compare} from 'fast-json-patch/index.mjs'
console.log({compare})Could not find a declaration file for module 'fast-json-patch/index.mjs'.
'/path/to/node_modules/fast-json-patch/index.mjs' implicitly has an 'any' type.
If the 'fast-json-patch' package actually exposes this module,
try adding a new declaration (.d.ts) file containing `declare module 'fast-json-patch/index.mjs'{ compare: [Function: compare] }Expected
import {compare} from 'fast-json-patch'
console.log({compare}){ compare: [Function: compare] }rokkie
Metadata
Metadata
Assignees
Labels
No labels