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.

Bogus import in generated dist ESM file

See original GitHub issue

Bug Report

https://unpkg.com/browse/react-virtualized@9.22.3/dist/es/WindowScroller/utils/onScroll.js

What is the current behavior?

Last line of the linked file has the following bogus import pointing to a non-existent export:

import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";

What is the expected behavior?

This import shouldn’t exist.

Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?

Not sure which version this started shipping - but this import breaks when imported in native browser ESM and also breaks in strict bundlers like esbuild / rollup.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:76
  • Comments:23 (1 by maintainers)

github_iconTop GitHub Comments

37reactions
0rvarcommented, Apr 29, 2021

@bvaughn can we remove that bogus import please?

21reactions
remorsescommented, Mar 19, 2021

I have published a version of the package with the fix, you can use it via resolutions field in package.json

{
    "resolutions": {
        "react-virtualized": "git+https://git@github.com/remorses/react-virtualized-fixed-import.git#9.22.3""
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Transpiling Typescript into double packages (CommonJS + ...
To do this, we set up the transpiler to generate esm and commonJS modules. In our situation, we can import a package from...
Read more >
Rollup ESM generates broken imports - Stack Overflow
I had a similar issue (though with stream module, not http ), and for me the solution was to set browser: true in...
Read more >
ECMAScript Modules - webpack
Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. *.js or *.mjs ) unless you...
Read more >
Build Targets - Vue CLI
dist /myLib.css : Extracted CSS file (can be forced into inlined by setting css: { extract: false } in vue.config.js ). WARNING.
Read more >
Options - Babel.js
npx babel --root-mode upward file.js # equivalent of passing the rootMode config ... code: false, }); // Minify the file in a second...
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