question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recent change to package.json/exports causes an issue in @restart/ui which breaks other downstream projects

See original GitHub issue

the 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:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
FezVrastacommented, Sep 3, 2021

I released a new version that reverts this, sorry for the trouble

2reactions
crokodzcommented, Sep 3, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found