blade-ink-rs icon indicating copy to clipboard operation
blade-ink-rs copied to clipboard

"Uncaught TypeError: Failed to resolve module specifier "env". Relative references must start with either "/", "./", or "../"." when running in a Bevy browser build

Open iluzdaf opened this issue 1 year ago • 0 comments

Environment

  • rustc 1.76.0 (07dca489a 2024-02-04)
  • bladeink 1.0.3
  • bevy 0.13.0
  • target wasm32-unknown-unknown
  • Browser: Arc 1.33.0 (47142)

Description When attempting to run a project using blade-ink-rs and Bevy in a browser, I encounter the error:

Uncaught TypeError: Failed to resolve module specifier "env". Relative references must start with either "/", "./", or "../".

I have attached a project that reproduces the issue.

Steps to reproduce

rustup target add wasm32-unknown-unknown
cargo install wasm-server-runner
cargo build --target wasm32-unknown-unknown
wasm-server-runner target/wasm32-unknown-unknown/debug/bladeink_test.wasm

bladeink_test.zip

I would appreciate any suggestions or known fixes on resolving this error. Thanks!

iluzdaf avatar Mar 08 '24 11:03 iluzdaf