tauri
tauri copied to clipboard
[bug] error: failed to get `serde` as a dependency of package `app v0.1.0 (/Users/project)`
Describe the bug
When i Setting Up macOS and run npm run tauri:serve throw error error: failed to get serde as a dependency of package app v0.1.0 (/Users/project)
Reproduction
No response
Expected behavior
No response
Platform and versions
Operating System - Mac OS, version 12.0.1 X64
Node.js environment
Node.js - 14.15.4
@tauri-apps/cli - 1.0.0-rc.4 (outdated, latest: 1.0.0-rc.7)
@tauri-apps/api - Not installed
Global packages
npm - 6.14.10
pnpm - Not installed
yarn - 1.22.10
Rust environment
rustup - 1.24.3
rustc - 1.59.0
cargo - 1.59.0
toolchain - stable-x86_64-apple-darwin
App directory structure
/dist
/node_modules
/public
/src-tauri
/dist_electron
/.git
/src
App
tauri - 1.0.0-rc.2 (no lockfile)
tauri-build - no manifest (no lockfile)
tao - no manifest (no lockfile)
wry - no manifest (no lockfile)
build-type - bundle
CSP - unset
distDir - Set automatically by Vue CLI plugin
devPath - Set automatically by Vue CLI plugin
framework - Vue.js (Vue CLI)
bundler - Webpack
Cargo.toml:
[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
default-run = "app"
edition = "2021"
rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.0.0-rc.1", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.0.0-rc.2", features = ["api-all"] }
[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = [ "custom-protocol" ]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = [ "tauri/custom-protocol" ]
Stack trace
No response
Additional context
No response
- Please fill out "Platform and versions" like asked with the output of
tauri info - Can you post your Cargo.toml? Do you have
serdeinside of that? - Can you see if running
cargo updatein your src-tauri dir prints any (more extensive) errors? If so, please post them too.
- Please fill out "Platform and versions" like asked with the output of
tauri info- Can you post your Cargo.toml? Do you have
serdeinside of that?- Can you see if running
cargo updatein your src-tauri dir prints any (more extensive) errors? If so, please post them too.
Updated
Please paste the full error message (also try removing src-tauri/Cargo.lock or running cargo update). It's easier to help you in Discord if you can join our server :) this error should never happen to a new project.
Also, your project path looks weird (/Users/project). Could be a permission issue.