deep-object-diff icon indicating copy to clipboard operation
deep-object-diff copied to clipboard

No version specified in mjs and cjs spawns errors in webpack

Open ymeskini opened this issue 2 years ago • 3 comments

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.

ymeskini avatar Apr 19 '22 10:04 ymeskini

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

JeremyBradshaw7 avatar Aug 17 '22 08:08 JeremyBradshaw7

Same error in VueJs image

dipak-telangre avatar Sep 13 '22 10:09 dipak-telangre

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).

mattphillips avatar Sep 14 '22 10:09 mattphillips