#Error initializing tauri-plugin-cli

6 messages · Page 1 of 1 (latest)

amber swan
#

I have problems getting tauri-plugin-cli to work.

Cargo.toml

[dependencies]
tauri-plugin-cli = "2.0.0-beta"

main.rs -- VERSION 1

tauri::Builder::default()
    .setup(|app| {
        app.handle().plugin(tauri_plugin_cli::init())?;
        Ok(())
    })
    .run(tauri::generate_context!())
    .expect("Error while running Tauri app");

main.ts -- VERSION 2

tauri::Builder::default()
    .plugin(tauri_plugin_cli::init())
    .run(tauri::generate_context!())
    .expect("Error while running Tauri app");

Both versions result in the same Error:

PluginInitialization("cli", "Error deserializing 'plugins.cli' within your Tauri configuration: invalid type: null, expected struct Config")

The plugin gets compiled: Compiling tauri-plugin-cli v2.0.0-beta.4

Other plugins work.

tauri and tauri-build are on version 2.0.0.-beta.15

I'm running Windows 11

amber swan
#

tauri-plugin-updater has the same issue!

Working:
autostart, deep-link, fs, http, notification, os, process, shell, single-instance

rancid tartan
#

can you share your tauri.conf.json file?

#

It's expecting some plugin configs in there which it can't work without.

amber swan
#

Ah, I see.

The install notes at https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/cli didn't mention this, but https://v2.tauri.app/plugin/cli/ does. The GitHub page should be updated (or at least link to the docs) ... I know, you guys have enough on your plates already.

Thanks, Fabian!

PS: Is there any documentation as to which configs the updater plugin needs?

GitHub

All of the official Tauri plugins in one place! Contribute to tauri-apps/plugins-workspace development by creating an account on GitHub.

Tauri

Parse arguments from the command line interface.

rancid tartan
#

PS: Is there any documentation as to which configs the updater plugin needs?
It wasn't migrated to v2 yet but the v1 docs should still mostly apply https://tauri.app/v1/guides/distribution/updater/ Just move the config from tauri.updater to plugins.updater (dialog: true was removed)