If you follow the docs to add updater like cargo tauri add updater, it adds everything but you'll get this error: error[E0433]: failed to resolve: use of undeclared crate or module tauri_plugin_updater.
The reason for this is because in the Cargo.toml it will add tauri-plugin-updater conditionally excluding mobile builds:
If you follow the docs to add updater like
cargo tauri add updater
, it adds everything but you'll get this error:error[E0433]: failed to resolve: use of undeclared crate or module tauri_plugin_updater
.The reason for this is because in the
Cargo.toml
it will addtauri-plugin-updater
conditionally excluding mobile builds:Thus, the program cannot find tauri-plugin-updater when referenced in the
lib.rs
builder.I fixed this by doing:
One option is we can update the install script to also do this by default.