2.1 KiB
2.1 KiB
Installation & Run (Linux)
Tauri 2 + React + Vite + Rust + SQLite. Tested on Ubuntu 22.04+ and Pop!_OS.
1. Prerequisites
Node.js 20 (or any LTS ≥ 18)
The Tauri 2 CLI uses optional chaining and crashes with SyntaxError: Unexpected token '.' on Node 14 or older. Check with node -v.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
exec $SHELL
nvm install 20
nvm alias default 20
Rust (stable)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
System libraries (Debian / Ubuntu / Pop!_OS)
sudo apt update
sudo apt install -y \
build-essential curl wget file pkg-config \
libwebkit2gtk-4.1-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libsoup-3.0-dev
2. Install dependencies
cd kml_map_tool
npm install
This also pulls @tauri-apps/cli. Rust deps build on first run.
3. Run in development
npm run tauri dev
- First run: 5–10 min while Rust deps compile.
- Subsequent runs: seconds.
- Closing the window stops everything.
The SQLite database is created at ~/.local/share/com.kml_map_tool.app/markers.db on first launch. To wipe it, use Reset DB in the app or delete the file.
4. Build a release binary
npm run tauri build
Output: src-tauri/target/release/bundle/ — .AppImage, .deb, and .rpm (whichever packagers are present on $PATH).
5. Troubleshooting
| Symptom | Fix |
|---|---|
SyntaxError: Unexpected token '.' from tauri.js |
Node too old. Upgrade to ≥ 18, then rm -rf node_modules package-lock.json && npm install. |
error: linker 'cc' not found |
sudo apt install build-essential |
failed to find webkit2gtk-4.1 |
Install libwebkit2gtk-4.1-dev. On Ubuntu < 22.04 only 4.0 is available — upgrade Ubuntu. |
| Blank white window on Wayland | WEBKIT_DISABLE_COMPOSITING_MODE=1 npm run tauri dev |
g_object_unref: assertion 'G_IS_OBJECT (object)' failed on quit |
Harmless WebKitGTK noise. Ignore. |
See README.md for the user guide.