FormidableLabs / react-fast-compare

fastest deep equal comparison for React
MIT License
1.59k stars 54 forks source link

module '/node_modules/react-fast-compare/index.js' does not provide an export #129

Open Cyneric opened 1 year ago

Cyneric commented 1 year ago

Uncaught SyntaxError: The requested module '/node_modules/react-fast-compare/index.js?v=4009a837' does not provide an export named 'default' (at usePopper.js?v=4009a837:4:8)

ryan-roemer commented 1 year ago

Can you provide a minimal reproduction? Offhand it looks like your build tool is assuming that there is a default export in ESM (or module.exports.default in CJS) whereas this library just has a normal CJS module.exports export, which is still extremely widespread for libraries. Most likely you need a build tool adjustment (or maybe an upstream library is somehow importing incorrectly.