#[Tauri v2] Command platform not found

5 messages · Page 1 of 1 (latest)

oblique scaffold
#

After running cargo update I'm no longer able to use the @tauri-apps/plugin-os command platform I'm not sure why. I have given the permission in my capabilities/desktop.json

os:allow-platform

The plugin is initialized in main .plugin(tauri_plugin_os::init())

and used in the JS side with

import { platform } from '@tauri-apps/plugin-os';

Why would it say that this command is no longer found?

tauri info

[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.16.0
    - pnpm: 8.10.2
    - npm: 9.5.1
    - bun: 1.0.11

[-] Packages
    - tauri [RUST]: 2.0.0-beta.23
    - tauri-build [RUST]: 2.0.0-beta.18
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 1.2.3
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.16

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
#

Command platform not found v2

#

[Tauri v2] Command platform not found

oblique scaffold
#

Cargo.toml

tauri-plugin-os = "2.0.0-beta" #this is deployed to version 7

package.json

    "@tauri-apps/plugin-os": "^2.0.0-beta.6",

There is no JS side for beta.7

random cloud
#

If it says Command platform not found in the error then this suggests that the js package is not on 2.0.0-beta.6 (did you re-run the install command?), because it's not supposed to invoke a command in the latest versions anymore.