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

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

Open
atanida opened this issue Mar 8, 2021 · 5 comments

Comments

@atanida
Copy link

atanida commented Mar 8, 2021

Wasm2wat gives this:
(import "env" "now" (func $now (type $t3)))

The function that triggers the horror is this one:
let _ = wasm_timer::Delay::new(std::time::Duration::from_secs(2)).await

@LighghtEeloo
Copy link

+1 with the exact error and code.

@jkelleyrtp
Copy link

Same here :(

@dicej
Copy link

dicej commented Jul 19, 2021

This fork has a fix for the issue: https://crates.io/crates/fluvio-wasm-timer

@mhuesch
Copy link

mhuesch commented Oct 14, 2021

I encountered a similar (I think?) issue with this code:

use wasm_timer::Delay;

...

let dur = Duration::from_millis(500);
Delay::new(dur).await;

leading to the not-terribly-helpful error in browser console:

Uncaught ReferenceError: __wbg_star0 is not defined
    <anonymous> http://localhost:8080/pkg/bundle.js:761
bundle.js:761:1
    <anonymous> http://localhost:8080/pkg/bundle.js:761

I was able to fix it using the comment above:

use fluvio_wasm_timer::Delay;

...

let dur = Duration::from_millis(500);
Delay::new(dur).await;

fluvio-wasm-timer = "0.2.5"

@Threadzless
Copy link

+1 same issue same solution

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

6 participants