Amplitude-JavaScript icon indicating copy to clipboard operation
Amplitude-JavaScript copied to clipboard

Script error while importing ESM JS for module '../blueimp-md5/js/md5.js'

Open ChetanGoti opened this issue 4 years ago • 1 comments

While importing amplitude-js in ES6 module, it throws error for blueimp-md5 module. Is there anything I'm missing?

import amplitude from "amplitude-js/amplitude.esm.js";

Current Behavior

Uncaught SyntaxError: The requested module '../blueimp-md5/js/md5.js' does not provide an export named 'default'

Environment

  • JS SDK Version: 7.4.3
  • Installation Method: yarn
  • Browser and Version or React Native and Device: Chrome Version 88.0.4324.192 (Official Build) (x86_64)

ChetanGoti avatar Feb 26 '21 07:02 ChetanGoti

hey @ChetanGoti, I was able to use amplitude.esm.js through es modules in a create-react-app project. I think the problem may be in your project-specific code transpilation. How are you doing that?

https://github.com/blueimp/JavaScript-MD5/issues/38

jooohhn avatar May 06 '21 16:05 jooohhn