You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
d3-inertia currently depends on versor ^0.1, which results in a download of versor 0.1.2. However, that version of versor incorrectly specifies its package.json file, by specifying module and jsnext:main as src/versor.js. No such file exists for that version; they should be pointing instead towards src/index.js (or instead src/index.js should have been src/versor.js).
This actually does not matter for many cases, since d3-inertia's usage of versor under the hood uses the bundled versions in the dist folder. However, some toolchains like Vite need this field to be correctly specified to avoid unnecessary bundling. Vite gives the following error when trying to run yarn start:
node_modules/vite/dist/node/chunks/dep-63d4bd14.js:43786:10: error: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "versor". The package may have incorrect main/module/exports specified in its package.json:
I thought it would be as simple as requiring d3-inertia to use versor 0.2.0, but this did not work when I tried it out because versor 0.2.0 has type: module in its package.json and thus the require statement in d3-inertia's minified file fails. So I'm not sure what the best solution is.
If this issue occurs for anyone else, a temp fix for d3-inertia users is to use patch-package after just renaming versor 0.1.2's src/index.js to src/versor.js.
The text was updated successfully, but these errors were encountered:
d3-inertia currently depends on versor ^0.1, which results in a download of versor 0.1.2. However, that version of versor incorrectly specifies its
package.json
file, by specifyingmodule
andjsnext:main
assrc/versor.js
. No such file exists for that version; they should be pointing instead towardssrc/index.js
(or insteadsrc/index.js
should have beensrc/versor.js
).This actually does not matter for many cases, since d3-inertia's usage of versor under the hood uses the bundled versions in the
dist
folder. However, some toolchains like Vite need this field to be correctly specified to avoid unnecessary bundling. Vite gives the following error when trying to runyarn start
:node_modules/vite/dist/node/chunks/dep-63d4bd14.js:43786:10: error: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "versor". The package may have incorrect main/module/exports specified in its package.json:
I thought it would be as simple as requiring d3-inertia to use versor 0.2.0, but this did not work when I tried it out because versor 0.2.0 has
type: module
in its package.json and thus therequire
statement in d3-inertia's minified file fails. So I'm not sure what the best solution is.If this issue occurs for anyone else, a temp fix for d3-inertia users is to use patch-package after just renaming versor 0.1.2's
src/index.js
tosrc/versor.js
.The text was updated successfully, but these errors were encountered: