tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.89k stars 2.37k forks source link

[bug] tauri_build::build() error #7602

Closed yydcnjjw closed 11 months ago

yydcnjjw commented 11 months ago

Describe the bug

        The `tauri` dependency features on the `Cargo.toml` file does not match the allowlist defined under `
tauri.conf.json`.
        Please run `tauri dev` or `tauri build` or add the `tray-icon` feature.

Reproduction

# Cargo.toml
[package]
name = "test"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tauri = { git = "https://github.com/tauri-apps/tauri.git", branch = "dev", features = ["tray-icon"] }

[build-dependencies]
tauri-build = { git = "https://github.com/tauri-apps/tauri.git", branch = "dev" }
# build.rs
fn main() {
    tauri_build::build();
}
# build command
cargo build

Expected behavior

No response

Platform and versions

[✔] Environment
    - OS: Arch Linux Unknown X64
    ✔ webkit2gtk-4.1: 2.40.5
    ✔ rsvg2: 2.56.3
    ✔ rustc: 1.73.0-nightly (1b198b3a1 2023-08-13)
    ✔ Cargo: 1.73.0-nightly (7e9de3f4e 2023-08-13)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: nightly-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.5.0
    - yarn: 1.22.19
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: git+https://github.com/tauri-apps/tauri.git?branch=dev#d928d23cdb15816f37c78579280622940dca6f81 (2.0.0-alpha.10)
    - tauri-build [RUST]: git+https://github.com/tauri-apps/tauri.git?branch=dev#d928d23cdb15816f37c78579280622940dca6f81 (2.0.0-alpha.6)
    - wry [RUST]: 0.31.0
    - tao [RUST]: 0.22.0
    - @tauri-apps/api [NPM]: not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.10

[-] App
    - build-type: build
    - CSP: unset
    - distDir: wmain/dist
    - devPath: http://localhost:18188/

Stack trace

No response

Additional context

No response

amrbashir commented 11 months ago

this should be fixed now, run cargo update in src-tauri and check again