`cargo metadata` exited with an error: error: failed to parse manifest at `/path/to/Cargo.toml`: feature `edition2024` is required
Some of our dependencies are now using Rust edition 2024, and thus we had to bump the Rust toolchain in our workspace too.
However, it’s now impossible to use wasm-pack to target WASM, as it exits with this error:
Error: `cargo metadata` exited with an error: error: failed to parse manifest at `REDACTED`
Caused by:
feature `edition2024` is required
The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.84.1 (66221abde 2024-11-19)).
Consider trying a newer version of Cargo (this may require the nightly release).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.
I assume something must be updated in wasm-pack?
I've also met this issue. The best way to fix thi issue is that verion down of rustc
where able to solve this issue?
First, install dependencies with the command of cargo add then drop here screenshot of issues
The 2024 edition has been stabilized in the 1.85 release use command rustup update to update to the latest version
you can check the version with rustc --version && cargo --version