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

Fix interaction_ts import path in package.json (currently hardcoded to local node/ path) #1535

Open
wulfraem opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog

Comments

@wulfraem
Copy link
Contributor

wulfraem commented Feb 19, 2025

The current import path for interaction_ts in the package.json in bindings/wasm/wasm_identity is hardcoded to the local node/ path.

Instead, we should be pointing to this dependency with a more flexible import, that supports node and web builds.

Unit tests for node WASM builds were running into issue due to being unable to find the @iota/iota-interaction-ts/move_calls/identity dependency as well, which sounds like it's related to this issue, e.g.:


Run npm run test:unit:node
  npm run test:unit:node
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    SCCACHE_DIR: /home/runner/.cache/sccache
    RUSTC_WRAPPER: sccache
    CURRENT_DATE: 2025-02-19

> @iota/identity-wasm@1.4.0 test:unit:node
> ts-mocha -p tsconfig.node.json ./tests/*.ts --parallel --exit



  1) Uncaught error outside test suite

  0 passing (1s)
  1 failing

  1) Uncaught error outside test suite:
     Uncaught Cannot find module '@iota/iota-interaction-ts/move_calls/identity'
Require stack:
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/identity_wasm.js
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/append_functions.js
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/index.js
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/tests/core.ts
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node_modules/mocha/lib/nodejs/esm-utils.js
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node_modules/mocha/lib/mocha.js
- /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node_modules/mocha/lib/nodejs/worker.js
  Error: Cannot find module '@iota/iota-interaction-ts/move_calls/identity'
  Require stack:
  - /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/identity_wasm.js
  - /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/append_functions.js
  - /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/node/index.js
  - /home/runner/work/identity.rs/identity.rs/bindings/wasm/identity_wasm/tests/core.ts
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
      at Function.Module._load (node:internal/modules/cjs/loader:873:27)
      at Module.require (node:internal/modules/cjs/loader:1100:19)
      at require (node:internal/modules/cjs/helpers:119:18)
      at Object.<anonymous> (node/identity_wasm.js:13:76)
      at Module._compile (node:internal/modules/cjs/loader:1198:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
      at Module.load (node:internal/modules/cjs/loader:1076:32)
      at Function.Module._load (node:internal/modules/cjs/loader:911:12)
      at Module.require (node:internal/modules/cjs/loader:1100:19)
@wulfraem wulfraem added Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog labels Feb 19, 2025
@eike-hass eike-hass self-assigned this Feb 19, 2025
@eike-hass eike-hass moved this from Product Backlog to Sprint Backlog in IOTA Trust Framework Developments Feb 19, 2025
@eike-hass eike-hass moved this from Sprint Backlog to In Progress in IOTA Trust Framework Developments Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
Status: In Progress
Development

No branches or pull requests

2 participants