Recent change to package.json/exports causes an issue in @restart/ui which breaks other downstream projects
See original GitHub issuethe change (https://github.com/popperjs/popper-core/pull/1342) seems to break this usage in some way.
What is the expected behavior?
The enums should have been found by webpacks with alternate imports.
When using imports like this https://github.com/react-restart/ui/blob/main/src/popper.ts#L9 should work
What went wrong?
ModuleNotFoundError: Module not found: Error: Package path ./lib/enums is not exported from package
.../Library/Caches/Bit/capsules/2b25412ad92805e9573583d4b25e6a7e05d89fd5/node_modules/@restart/ui/node_modules/
@popperjs/core (see exports field in .../Library/Caches/Bit/capsules/2b25412ad92805e9573583d4b25e6a7e05d89fd5/node_modules/@restart/ui/node_modules/
@popperjs/core/package.json)
Any other comments?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:8 (1 by maintainers)
Top Results From Across the Web
@tsmodule/tsmodule - npm
tsmodule is a toolkit for developing standardized, pure ESM TypeScript modules that target any platform. Table of contents. Installation.
Read more >Announcing TypeScript 4.7 - Microsoft Developer Blogs
json Exports, Imports, and Self-Referencing. Node.js supports a new field for defining entry points in package.json called "exports" . This ...
Read more >ECMAScript modules | Node.js v19.3.0 Documentation
ECMAScript modules are the official standard format to package JavaScript code for reuse. Modules are defined using a variety of import and export...
Read more >Publish ESM and CJS in a single package - Anthony Fu
The root cause is that ESM is asynchronous by nature, ... With the new exports field in package.json , you can now specify...
Read more >Angular package format
In today's JavaScript landscape, developers consume packages in many different ways, using many different toolchains (Webpack, rollup, esbuild, etc.). These ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I released a new version that reverts this, sorry for the trouble
yep same here, need to npm remove @popperjs/core and npm install @popperjs/core@2.9.3 in my pipeline just to get it working