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
We replaced usages of lodash with es-toolkit/compat in our library, @carbon/react, and have found that consumers with older toolchains are encountering issues with this module, carbon-design-system/carbon#18403.
Two primary issues have been reported:
Projects using jest <=v27 fail and require adding a moduleNameMapper entry to their jest config
Projects using create-react-app/webpack fail to build w/ error:
.\node_modules\@carbon\react\es\components\DataTable\Table.js
Cannot find module: 'es-toolkit/compat'. Make sure this package is installed.
I think the cause is either
some (older) tooling lacks proper support for the exports field in package.json
.mjs files trip up certain toolchains module resolution for some reason
There may not be anything you can or want to do to help this situation. You're using exports correctly, it's the tooling w/ the issue. I opted to try and avoid the module resolution problems altogether by temporarily marking es-toolkit as an internal and inline what we use into our bundle, carbon-design-system/carbon#18639
Feel free to close this if you agree it's not actionable on your part. Thanks for all your work on this library! 🙏
The text was updated successfully, but these errors were encountered:
We replaced usages of lodash with
es-toolkit/compat
in our library,@carbon/react
, and have found that consumers with older toolchains are encountering issues with this module, carbon-design-system/carbon#18403.Two primary issues have been reported:
moduleNameMapper
entry to their jest configI think the cause is either
exports
field inpackage.json
There may not be anything you can or want to do to help this situation. You're using
exports
correctly, it's the tooling w/ the issue. I opted to try and avoid the module resolution problems altogether by temporarily markinges-toolkit
as an internal and inline what we use into our bundle, carbon-design-system/carbon#18639Feel free to close this if you agree it's not actionable on your part. Thanks for all your work on this library! 🙏
The text was updated successfully, but these errors were encountered: