You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into an interesting bug where attempting to run a wasm32-compiled program with fastrand in it gives this error in the console:
Uncaught TypeError: Error resolving module specifier “env”. Relative module specifiers must start with “./”, “../” or “/”.
I'm using fastrand = "1.8.0"
I encountered this after adding futures-lite to my project, which depends on fastrand. rustwasm/wasm-bindgen#2215 explains a few reasons why this error might pop up.
I got around this problem by using futures_lite::StreamExt::or instead of futures_lite::StreamExt::race. race uses fastrand::bool, whereas or does not.
The text was updated successfully, but these errors were encountered:
I've run into an interesting bug where attempting to run a wasm32-compiled program with
fastrand
in it gives this error in the console:I'm using
fastrand = "1.8.0"
I encountered this after adding
futures-lite
to my project, which depends onfastrand
. rustwasm/wasm-bindgen#2215 explains a few reasons why this error might pop up.I got around this problem by using
futures_lite::StreamExt::or
instead offutures_lite::StreamExt::race
.race
usesfastrand::bool
, whereasor
does not.The text was updated successfully, but these errors were encountered: