Run any shell commands using OS shell in Tauri App Env #3600
-
I've setup a basic tauri app for my project and testing some of its apis like shell, cli etc. My question is: I've read shell JS api but getting some erros like :
Here's tauri.conf.json: A basic react function:
HTML: I haven't found any relevant example or discussions and documentation is not that detailed. Help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I ran into the same error. Please make sure you are using the latest tauri version. Updating
in This example demonstrates how to use |
Beta Was this translation helpful? Give feedback.
I ran into the same error.
Please make sure you are using the latest tauri version.
Shell scope functions seems relative new feature, which was implemented in 10314cd
Updating
"@tauri-apps/api": "^1.0.0-beta.8"
to"@tauri-apps/api": "^1.0.0-rc.2
"@tauri-apps/cli": "^1.0.0-beta.10"
to"@tauri-apps/cli": "^1.0.0-rc.7"
tauri-build = { version = "1.0.0-beta.4" }
totauri-build = { version = "1.0.0-rc.4" }
tauri = { version = "1.0.0-beta.8", features = ["api-all"] }
totauri = { version = "1.0.0-rc.4", features = ["api-all"] }
in
package.json
andsrc-tauri/Cargo.toml
solved the issue in my case.This example demonstrates how to use
Command
API in JavaScript and how to con…