Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs to stress the requirement on tauri-cli. #204

Open
Barafu opened this issue Feb 20, 2023 · 3 comments · Fixed by #242
Open

Needs to stress the requirement on tauri-cli. #204

Barafu opened this issue Feb 20, 2023 · 3 comments · Fixed by #242
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Barafu
Copy link

Barafu commented Feb 20, 2023

If tauri-cli is not installed, trying to run the Build and Dev actions display very misleading error about cargo.toml file missing. Either the extension needs to check for this, or at least add a reminder to install tauri-cli in the extension description. VSCode recommends this extension when opening a tauri project, so you may assume that some users are building tauri app for the first time.

@amrbashir
Copy link
Member

Could you post the full error? the extension does check if tauri-cli is installed before trying to use it

@Barafu
Copy link
Author

Barafu commented Feb 20, 2023

OK, so the steps are: On a new machine (I used Windows Sandbox on Win 11) install Rust, with dependencies, VSCode. Then do cargo install create-tauri-app, then cargo create-tauri-app. Choose cargo package manager and no frameworks. Open the folder in VSCode. It suggests Tauri extension and rust-analyzer. Install both. Restart VSCode.
Run command: Tauri: Dev. It produces an error popup: "Couldn't detect package manager for current project.". Press hotkey for build task: "could not find Cargo.toml in C:\test\testrr or any parent directory". Then close VSCode and open src-tauri folder in it. Run Tauri: Dev. It reports "Tauri project not found".
Took me some time to understand that I missed cargo install tauri-cli.

@amrbashir
Copy link
Member

cargo create-tauri-app prints the instructions to install needed prerequisites including tauri-cli if you choose cargo as the package manager.

I will see if we can improve the errors a bit to direct you in the correct directions.

@amrbashir amrbashir added enhancement New feature or request good first issue Good for newcomers labels Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants