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

Error: 'default' is not exported by ../../node_modules/blueimp-md5/js/md5.js, imported by ../../node_modules/md5-hex/browser.js #16

Closed
digitaltopo opened this issue May 7, 2021 · 1 comment

Comments

@digitaltopo
Copy link

Having an issue recently while using (gravatar-url)[https://github.com/sindresorhus/gravatar-url] package, seems to be a bad import statement in md5-hx looking for a default export in blueimp-md5.

I'm using rollupjs to bundle code.

Would appreciate any clarification on this, thank you!

(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
node:querystring (imported by ../../node_modules/gravatar-url/index.js)
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
../../node_modules/blueimp-md5/js/md5.js
400:     $.md5 = md5
401:   }
402: })(this)
        ^
[!] Error: 'default' is not exported by ../../node_modules/blueimp-md5/js/md5.js, imported by ../../node_modules/md5-hex/browser.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
../../node_modules/md5-hex/browser.js (1:7)
1: import blueimpMd5 from 'blueimp-md5';
          ^
2: 
3: export default function md5Hex(data) {
Error: 'default' is not exported by ../../node_modules/blueimp-md5/js/md5.js, imported by ../../node_modules/md5-hex/browser.js
@sindresorhus
Copy link
Owner

This is a problem with Rollup.js. Open an issue there instead. This package runs fine in Node.js without bundling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants