Can't find crate for `wasm_bindgen_macro` when building using wasm-pack

I've been trying to use wasm-pack to create a simple alert mostly for testing purposes, however each time I try building (using wasm-pack build) I get these errors:

error[E0463]: can't find crate for `wasm_bindgen_macro`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.91/src/lib.rs:57:13
   |
57 |     pub use wasm_bindgen_macro::__wasm_bindgen_class_marker;
   |             ^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `wasm_bindgen_macro`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.91/src/lib.rs:58:13
   |
58 |     pub use wasm_bindgen_macro::wasm_bindgen;
   |             ^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `wasm_bindgen_macro`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.91/src/lib.rs:67:9
   |
67 | pub use wasm_bindgen_macro::link_to;
   |         ^^^^^^^^^^^^^^^^^^ can't find crate

For more information about this error, try `rustc --explain E0463`.
error: could not compile `wasm-bindgen` (lib) due to 3 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "/home/runner/private_information/hello-wasm" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"

I've tried reinstalling wasm-pack, reinstalling rust, trying different parameters for build, installing wasm_bindgen_macro directly using cargo, and so far nothing has worked. I've checked the official wasm-pack GitHub for issues, but no similar issues are open there. Looked on places like here and StackOverflow too, and still couldn't find anything. Is there any way to fix this?

If it helps I'm currently using Rust 1.76.0 on Replit.

Isn't is wasm-pack build not cargo build?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.