iotaledger / iota-sdk

The IOTA SDK provides developers with a seamless experience to develop on IOTA by providing account abstractions and clients to interact with node APIs.
Apache License 2.0
54 stars 39 forks source link

[Bug]: Error while importing the web version in webpack #2255

Open Druelik opened 1 week ago

Druelik commented 1 week ago

Issue description

After updating to the latest version 1.1.3 and following the examples. Webpack reports error while importing the wasm library.

OutputDiscriminator seems to be undefined. At least it is that, what webpack reports back as error.

Returning to version 1.1.2 fixes the Problem.

Version

@iota/sdk-wasm : 1.1.3

Expected behaviour

Import should work without errors

Actual behaviour

Webpack errors on the import.

Can the issue reliably be reproduced?

Yes

Steps to reproduce the issue

  1. Follow the example, with webpack
  2. Import the lib
  3. See the crash in the browser.

Errors

Log:

Uncaught TypeError: _output__WEBPACK_IMPORTED_MODULE_2__ is undefined
    OutputDiscriminator index.js:21
    OutputResponse output-response.ts:20
    <anonymous> output-response.ts:23
    node_modules chunk-vendors.js:867

Screenshot: image

Duplicate declaration