Closed kristianmandrup closed 7 months ago
Can you please describe your exact steps where you ended up with @tauri-apps/cli
having 1.x
version?
Sure. I first followed the guide at https://beta.tauri.app/blog/create-tauri-app-version-3-released/
pnpm create-tauri-app --beta --mobile
I aborted this since a number of steps were missing and I wanted to use bun.
I then discovered this this guide which I followed, installing to the same folder as my aborted attempt (that may be the reason?)
bunx create-tauri-app --beta --mobile
cd test-app
bun install
bun run tauri dev
Each time I started the project generator, I chose the following options
I then followed the prerequisites guide at https://beta.tauri.app/guides/prerequisites/#ios
Making sure I had the latest Rust installed, latest Node LTS and so on.
It seems very difficult to find a good guide for how to install, configure and run a project with v2 beta and a lot of the guides still reference the alpha version.
I might have done --alpha
in my first attempt and then run again with --beta
using the same project name and hence location, overwriting previous files, which could have messed things up I guess. I'll proceed to do a clean start with a new project name or location
None of what you tried should ever result in a package.json with 1.x version of the CLI even if you aborted. Also your tauri info
suggests you have 2.x of the CLI.
The only issue I see is that you have tauri-cli
installed globally which is 1.x, maybe you ran cargo tauri dev
instead of bun run tauri dev
?
I will close this issue for now but feel free to ping me if you still face the issue.
Now that I think about it, it may have been due to me being unable to follow the guide "to the letter", ie. the tauri
command failed. Then I found a way to install the tauri CLI, but without specifying the version explicitly, initially. Then I finally managed to be able to run tauri (but with bunx
I guess?) and then there was a mismatch as would be expected. Ideally, I guess the CLI could determine such a mismatch instead of simply failing on not being able to parse the tauri config files.
Describe the bug
After having created a tauri 2.0 beta project for mobile, the
tauri ios init
command failed as per this issueThis was due to
package.json
dev dependency having tauri CLI set to 1.x. It works when updated to 2.x as demonstrated by this demo projectReproduction
Expected behavior
tauri
commands such astauri ios init
should work after generating a project using official starter guide with--beta
optionFull
tauri info
outputStack trace
No response
Additional context
No response