mattphillips / deep-object-diff

Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
https://www.npmjs.com/package/deep-object-diff
MIT License
1.05k stars 89 forks source link

No version specified in mjs and cjs spawns errors in webpack #82

Open ymeskini opened 2 years ago

ymeskini commented 2 years ago

Hey, I have the following error with the latest version 1.1.7 saying that there is no version specified in package.json and there is no version in mjs/package.json

WARNING in shared module deep-object-diff -> /node_modules/deep-object-diff/mjs/index.js
No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file, or manually specify version in shared config.
JeremyBradshaw7 commented 2 years ago

Getting a similar warning in a react native typescript project:

warn Package deep-object-diff has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/.../ccf/node_modules/deep-object-diff/package.json

dipak-telangre commented 2 years ago

Same error in VueJs image

mattphillips commented 2 years ago

Hey all, are you using webpack and running into this issue?

I've just had a quick google search and found: https://github.com/webpack/webpack/issues/13457 which I think may be related.

I could potentially add a name and version field to the package.json for both the CJS and ESM builds like what has been done here: https://github.com/okta/okta-auth-js/pull/1269#discussion_r942691060 but I don't think that is the correct solution (as name and version should only be needed in the root package.json of the package).