Repository: tauri-apps/tauri (language: rust)

Issue:
[bug] migrate bug when update NPM dependency "tauri-plugin-clipboard-manager-api"
### Describe the bug

When I attempted to update my project using the migration tool, it failed. Upon reviewing the logs, I discovered that the name of an npm dependency was incorrect. This is the complete output:
❯ npm run tauri migrate

> RockeIM@0.0.1 tauri
> tauri migrate

    Info Installing NPM dependency "@tauri-apps/api@^2.0.0"...
    Info Installing Cargo dependency "tauri-plugin-process"...
    Info Installing NPM dependency "@tauri-apps/plugin-process@>=2"...
    Added permission `process:default` to `migrated` at /Users/alarak/WorkSpace/imdesk/src-tauri/capabilities/migrated.json
    Info Adding plugin to /Users/alarak/WorkSpace/imdesk/src-tauri/src/main.rs
    Info Running `cargo fmt`...
    Info Installing Cargo dependency "tauri-plugin-shell"...
    Info Installing NPM dependency "@tauri-apps/plugin-shell@>=2"...
    Added permission `shell:default` to `migrated` at /Users/alarak/WorkSpace/imdesk/src-tauri/capabilities/migrated.json
    Info Adding plugin to /Users/alarak/WorkSpace/imdesk/src-tauri/src/main.rs
    Info Running `cargo fmt`...
    Info Installing Cargo dependency "tauri-plugin-notification"...
    Info Installing NPM dependency "@tauri-apps/plugin-notification@>=2"...
    Added permission `notification:default` to `migrated` at /Users/alarak/WorkSpace/imdesk/src-tauri/capabilities/migrated.json
    Info Adding plugin to /Users/alarak/WorkSpace/imdesk/src-tauri/src/main.rs
    Info Running `cargo fmt`...
    Info Installing Cargo dependency "tauri-plugin-clipboard-manager"...
    Info Installing NPM dependency "tauri-plugin-clipboard-manager-api"...
failed to migrate from v1: Could not migrate plugin 'clipboard-manager': Failed to install NPM dependency
    Error failed to migrate from v1: Could not migrate plugin 'clipboard-manager': Failed to install NPM dependency

### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
❯ npm run tauri info

> RockeIM@0.0.1 tauri
> tauri info


[✔] Environment
    - OS: Mac OS 14.7.0 x86_64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.83.0 (90b35a623 2024-11-26)
    ✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (default)
    - node: 22.12.0
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.2.3
    - tauri-build 🦀: 2.0.5
    - wry 🦀: 0.48.1
    - tao 🦀: 0.31.1
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.5

[-] Plugins
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0
    - tauri-plugin-notification 🦀: 2.2.1
    - @tauri-apps/plugin-notification : 2.2.1
    - tauri-plugin-process 🦀: 2.2.0
    - @tauri-apps/plugin-process : 2.2.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - framework: Vue.js
    - bundler: Vite
```

### Stack trace

```text

```

### Additional context

_No response_


Discussion / hints:

Fix patch:
diff --git a/.changes/cli-add-clipboard.md b/.changes/cli-add-clipboard.md
new file mode 100644
index 000000000000..045f8d112792
--- /dev/null
+++ b/.changes/cli-add-clipboard.md
@@ -0,0 +1,5 @@
+---
+tauri-cli: 'patch:bug'
+---
+
+Fixed an issue that prevented `tauri add` to work for the `clipboard-manager` plugin.
diff --git a/crates/tauri-cli/src/helpers/plugins.rs b/crates/tauri-cli/src/helpers/plugins.rs
index 83201231b705..3d933af58196 100644
--- a/crates/tauri-cli/src/helpers/plugins.rs
+++ b/crates/tauri-cli/src/helpers/plugins.rs
@@ -70,6 +70,7 @@ pub fn known_plugins() -> HashMap<&'static str, PluginMetadata> {
     "upload",
     "websocket",
     "opener",
+    "clipboard-manager",
   ] {
     plugins.entry(p).or_default();
   }


Test patch: