Tauri 2.0 is still in the beta stage, but we can also try it, and today I'm going to upgrade 1.0 to 2.0 beta, a little problems occured,the article is the solution.
1.Problem1
In Debian 12, when I typed pnpm tauri dev, then got the following error message:
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags javascriptcoregtk-4.1 javascriptcoregtk-4.1 >= 2.38
The system library `javascriptcoregtk-4.1` required by crate `javascriptcore-rs-sys` was not found.
The file `javascriptcoregtk-4.1.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `javascriptcoregtk-4.1.pc`.
warning: build failed, waiting for other jobs to finish...
ELIFECYCLE Command failed.
2.Solution1
Open the terminal and enter the following
sudo apt install libwebkit2gtk-4.1-dev
3.Problem2
when I typed pnpm tauri dev, then got the following error message:
Failed to resolve import @tauri-apps/api/core from src/main.ts
4.Solution2
Open the terminal and enter the following
pnpm update @tauri-apps/api@next