Missing `index.umd.cjs` in final build
Closed this issue · 2 comments
kilemensi commented
Description
The exports.require
in package.json points to index.umd.cjs
. Shouldn't it point to index.cjs
instead?
Otherwise, getting this error on require.resolve("react-share")
Error: Cannot find module '/Users/xxx/node_modules/react-share/dist/index.umd.cjs'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1098:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1091:15)
at resolveExports (node:internal/modules/cjs/loader:567:14)
at Module._findPath (node:internal/modules/cjs/loader:636:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/xxx/jest.config.js:9:20)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
ELIFECYCLE Command failed with exit code 1.
Versions
react-share: 5.0.2
node: 18.18.2
nygardk commented
Hey and thanks for pointing this out! Indeed it should. I don't know where this .umd.
had slipped in from 👀 .
Fixed now in v5.0.3
!