Uncaught TypeError: Error resolving module specifier “env”. Relative module specifiers must start with “./”, “../” or “/”.
This repo is a minimal example for reproducing the compilation bug.
- Open
cargo make serve
andcargo make watch
. - Without changing any code, open
localhost:8000
and you should see"Nothing yet!"
. - Uncomment the line at the top of
init
and refresh the page. - Notice a blank page and the above error in the browser Console.
- Uncomment the
parking_lot
line inCargo.toml
and revisit the page. Notice no change. - Close
cargo make watch
once and docargo make build_release
. This employslto
and other optimizations. - You'll see
"Nothing yet!"
on the page, but the WASM panics at runtime with:
panicked at 'time not implemented on this platform', library/std/src/sys/wasm/../unsupported/time.rs:39:9
- Uncomment the
chrono
line inCargo.toml
. Theenv
error is back. - Uncomment the
ring
line inCargo.toml
. Theenv
error persists.
Changing optimization levels, etc., doesn't seem to have an effect.