Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[use-http module] Cannot read property '__moduleExports' of undefined #385

Closed
ashubham opened this issue Jun 11, 2020 · 1 comment · May be fixed by slumericanBx/vite#1
Closed

[use-http module] Cannot read property '__moduleExports' of undefined #385

ashubham opened this issue Jun 11, 2020 · 1 comment · May be fixed by slumericanBx/vite#1

Comments

@ashubham
Copy link
Contributor

Describe the bug

When using the use-http package, the vite optimizer produces a module which fails during runtime with the following error:

image

FWIW, I have already been using Rollup in my project and the use-http package was being built successfully to a bundle.

Reproduction

I used create-vite-app to create a React app and just added the module to repro the issue:
https://github.com/ashubham/vite-bug-1

System Info

  • required vite version: 0.20.7
  • required Operating System: OSX
  • required Node version: 12.11.0
@yyx990803
Copy link
Member

Seems still an issue from @rollup/plugin-commonjs: rollup/plugins#411

I would recommend bugging the author of use-http to switch to ESM syntax and publish an ESM build instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants