Uncaught TypeError: Bare Specifier “env” Not Remapped During Trunk Serve #817
Replies: 7 comments 1 reply
-
Also getting this. But it's only affecting my github actions builds and I'm unable to replicate locally with either Running a
Out of these only cc has updated recently enough to be the culprit and indeed manually reverting cc in the cargo lock and doing a fresh build fixed it locally for me. It looks like in my case I'm depending on cc through zstd-safe -> zstd-sys -> cc. If your issue is also with cc you can change your [[package]]
name = "cc"
version = "1.0.101"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d"
dependencies = [
"jobserver",
"libc",
"once_cell",
] Edit: Put in issue on cc for this. rust-lang/cc-rs#1113 |
Beta Was this translation helpful? Give feedback.
-
Thanks for the mention @Kuuuube , but the issue still persists. My |
Beta Was this translation helpful? Give feedback.
-
Can you explain where and how you get that error? |
Beta Was this translation helpful? Give feedback.
-
To provide context, we are exploring publishing our rust application pigg to wasm. |
Beta Was this translation helpful? Give feedback.
-
Ah I see. So trunk "only" orchestrates the build. I think a good detailed explanation for this is here: rustwasm/wasm-bindgen#3500 In a nutshell, you're compiling something to WASM that doesn't work on a WASM target. To my understanding, the basically is a "symbol not found" error. You would need to find what dependency brings that in, and then ensure that creates proper code for WASM. Things like env-var, won't work on WASM. |
Beta Was this translation helpful? Give feedback.
-
I guess it makes sense to transform this into a discussion if that's ok with you. |
Beta Was this translation helpful? Give feedback.
-
Sure, will do |
Beta Was this translation helpful? Give feedback.
-
Problem
Uncaught TypeError: The specifier “env” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
Details
When building my project, an error occurs indicating that a bare specifier "env" is not properly remapped, causing a TypeError in the browser console.
Reference for my Cargo.toml file
Any help is highly appreciated!
Thx in adv!
Beta Was this translation helpful? Give feedback.
All reactions