tauri: [bug] failed to get project out directory: failed to get cargo metadata: program not found error Command failed with exit code 1.
Describe the bug
Tauri project created with package manager: yarn and UI template: react-ts
I already installed all the requirements.
This is what I see in my terminal when I try to run the command yarn tauri dev to start the project.

Reproduction
- Generate project using
create tauri-app - Choose
yarn package manager - Use
react-tsUI template - Run using
yarn tauri dev
Expected behavior
No response
Platform and versions
yarn: 1.22.17
Stack trace
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 26 (6 by maintainers)
Commits related to this issue
- fix: resolve Rust cargo PATH issues for Windows development Fix cargo metadata and PATH configuration issues - Add automated setup script (scripts/setup.ps1) for Windows environment - Configure Rust... — committed to AssQ222/PDRPG by AssQ222 a year ago
- docs: add comprehensive Windows setup documentation - Add WINDOWS_SETUP.md with detailed troubleshooting guide - Include manual setup instructions as fallback - Document common PATH and toolchain iss... — committed to AssQ222/PDRPG by AssQ222 a year ago
Just install Rust, follow on https://tauri.app/v1/guides/getting-started/prerequisites
This is the repository link. I didn’t change anything after the project was created. It’s my first time using tauri, so I don’t know anything, I just installed the requirements
Thanks. Forgot to install rust
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh. Works now.I just followed the QuickStart guide, it didn’t say anything about prerequisites.
It should link to the prerequisites page.
If there is any other first-timers (like me) getting stuck on this issue, I skipped over the line “Note that you have to restart your terminal, and in some cases, Windows itself, for the changes to take effect.”
Stupid, I know, don’t be like me.
@serg06 All quick start guides have a note at the top:
And create-tauri-app also prints a warning after running it:
Where else could we add a warning, or how should the existing ones look like to avoid this confusion? Feedback is always much appreciated 🙏
An important note for MacOS users. You probably have to restart or log out before rust installation will take effect. That was the case for me on Mojave 10.14.6.
I just ran against this, the only thing that worked was using powershell in windows
I fixed this by restarting the terminal
Restart of VSCode did the job for me.
I actually still get this issue in vs code, even after installing Rust and running it just fine in command prompt, but command prompt in vs code still errors
EDIT:
echo %PATH%has cargo in command prompt but not vs codeI know I’m a dumb dumb for not installing rust first, but it would help if instead of giving the error:
Error failed to get cargo metadata: program not found, when runningnpm run tauri dev, it was somehow able to detect Rust isn’t installed and saidError: Rust is not installedor something similar.When I google “tauri” and click “quick start” on the first result, I get to https://tauri.app/v1/guides/getting-started/setup/ and the top says “The easiest way to scaffold a new project is the create-tauri-app” which links (of course) here and a tthe top of the readme, I see
npm create tauri-app@latestunder “npm” (of course) and then run it and got this far. Again, I know I’m a dumb dumb, but I think this would be a very common path that people trying tauri for the first time would follow (somehow landing on the quick start page and/or this repo and then running create tauri-app@latest). Just my two cents. Thanks!I have the same issue on Windows, ridiculous how it is some kind of linking issue with Windows, even after restarting, obviously have rust and cargo installed.
Ahh i see, you’re totally right! thank you!
@FabianLars Ahh I see. Let me explain how I missed it:
yarn create tauri-appto create an appIt would be great if it could be added to that page!