[bug] build error (?) cannot find file specified
Describe the bug
On build, when trying to go into dev, it panics because it can't find a specified something in src/main.rs:14:10
Reproduction
yarn create tauri-app project name: spellbook frontend: TypeScript / JavaScript package manager: yarn ui template: vanilla ui flavor: TypeScript
cd spellbook yarn yarn tauri dev
Expected behavior
No response
Platform and versions
[✔] Environment
- OS: Windows 10.0.19045 X64
✔ WebView2: 112.0.1722.64
✔ MSVC: Visual Studio Build Tools 2019
✔ rustc: 1.70.0 (90c541806 2023-05-31)
✔ Cargo: 1.70.0 (ec8a8a0ca 2023-04-25)
✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 18.16.0
- yarn: 1.22.19
- npm: 9.5.1
[-] Packages
- tauri [RUST]: 1.4.0
- tauri-build [RUST]: 1.4.0
- wry [RUST]: 0.24.3
- tao [RUST]: 0.16.2
- @tauri-apps/api [NPM]: 1.4.0
- @tauri-apps/cli [NPM]: 1.4.0
[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:1420/
- bundler: Vite
Stack trace
No response
Additional context
No response
gccis somepow choosy what to dickport
Am I somehow missing something? I don't know what this means
OP is on Windows using the msvc target though, there shouldn't be any gcc involved (though you're right with your last message :joy:)
Can you post a screenshot of the error you're seeing please?
Mass block below, this is creating a fresh tauri-app from 0, with the same error at the bottom. I didn't know what you'd need, so I just put it all in.
` Microsoft Windows [Version 10.0.19045.3086] (c) Microsoft Corporation. All rights reserved.
C:\Users\carlc>yarn yarn install v1.22.19 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/4] Resolving packages... success Already up-to-date. Done in 0.02s.
C:\Users\carlc>yarn create tauri-app yarn create v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages...
success Installed "[email protected]" with binaries: - create-tauri-app ✔ Project name · spellbook ✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm) ✔ Choose your package manager · yarn ✔ Choose your UI template · Vanilla ✔ Choose your UI flavor · TypeScript
Template created! To get started run: cd spellbook yarn yarn tauri dev
Done in 10.09s.
C:\Users\carlc>cd spellbook
C:\Users\carlc\spellbook>yarn yarn install v1.22.19 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Saved lockfile. Done in 4.19s.
C:\Users\carlc\spellbook>yarn tauri dev
yarn run v1.22.19
$ tauri dev
Running BeforeDevCommand (yarn dev)
$ vite
VITE v4.3.9 ready in 166 ms
➜ Local: http://localhost:1420/
➜ Network: use --host to expose
Info Watching C:\Users\carlc\spellbook\src-tauri for changes...
Updating crates.io index
Downloaded tauri v1.4.1
Downloaded 1 crate (220.0 KB) in 0.78s
Compiling proc-macro2 v1.0.60
Compiling unicode-ident v1.0.9
Compiling quote v1.0.28
Compiling cfg-if v1.0.0
Compiling autocfg v1.1.0
Compiling serde v1.0.164
Compiling syn v1.0.109
Compiling ppv-lite86 v0.2.17
Compiling siphasher v0.3.10
Compiling getrandom v0.1.16
Compiling windows_x86_64_msvc v0.48.0
Compiling memchr v2.5.0
Compiling getrandom v0.2.10
Compiling itoa v1.0.6
Compiling phf_shared v0.8.0
Compiling rand_core v0.6.4
Compiling ryu v1.0.13
Compiling proc-macro-hack v0.5.20+deprecated
Compiling fnv v1.0.7
Compiling rand_chacha v0.3.1
Compiling phf_shared v0.10.0
Compiling smallvec v1.10.0
Compiling windows-tokens v0.39.0
Compiling rand v0.8.5
Compiling lock_api v0.4.10
Compiling byteorder v1.4.3
Compiling parking_lot_core v0.9.8
Compiling once_cell v1.18.0
Compiling thiserror v1.0.40
Compiling serde_json v1.0.97
Compiling windows-targets v0.48.0
Compiling log v0.4.19
Compiling rand_core v0.5.1
Compiling scopeguard v1.1.0
Compiling windows_x86_64_msvc v0.39.0
Compiling rand_pcg v0.2.1
Compiling rand_chacha v0.2.2
Compiling phf_generator v0.10.0
Compiling bitflags v1.3.2
Compiling new_debug_unreachable v1.0.4
Compiling mac v0.1.1
Compiling ident_case v1.0.1
Compiling winapi v0.3.9
Compiling precomputed-hash v0.1.1
Compiling cc v1.0.79
Compiling tinyvec_macros v0.1.1
Compiling strsim v0.10.0
Compiling futf v0.1.5
Compiling syn v2.0.18
Compiling rand v0.7.3
Compiling parking_lot v0.12.1
Compiling string_cache_codegen v0.5.2
Compiling tinyvec v1.6.0
Compiling dtoa v1.0.6
Compiling utf-8 v0.7.6
Compiling aho-corasick v1.0.2
Compiling dtoa-short v0.3.4
Compiling tendril v0.4.3
Compiling nodrop v0.1.14
Compiling stable_deref_trait v1.2.0
Compiling itoa v0.4.8
Compiling libc v0.2.146
Compiling unicode-bidi v0.3.13
Compiling alloc-no-stdlib v2.0.4
Compiling regex-syntax v0.7.2
Compiling matches v0.1.10
Compiling phf_generator v0.8.0
Compiling unicode-normalization v0.1.22
Compiling percent-encoding v2.3.0
Compiling convert_case v0.4.0
Compiling alloc-stdlib v0.2.2
Compiling phf_codegen v0.8.0
Compiling form_urlencoded v1.2.0
Compiling markup5ever v0.10.1
Compiling selectors v0.22.0
Compiling servo_arc v0.1.1
Compiling fxhash v0.2.1
Compiling idna v0.4.0
Compiling uuid v1.3.4
Compiling semver v1.0.17
Compiling thin-slice v0.1.1
Compiling darling_core v0.20.1
Compiling regex v1.8.4
Compiling brotli-decompressor v2.3.4
Compiling dunce v1.0.4
Compiling cfb v0.7.3
Compiling indexmap v1.9.3
Compiling version_check v0.9.4
Compiling glob v0.3.1
Compiling typenum v1.16.0
Compiling serde_derive v1.0.164
Compiling thiserror-impl v1.0.40
Compiling cssparser-macros v0.6.1
Compiling infer v0.12.0
Compiling brotli v3.3.4
Compiling generic-array v0.14.7
Compiling windows-implement v0.39.0
Compiling phf_macros v0.8.0
Compiling cssparser v0.27.2
Compiling darling_macro v0.20.1
Compiling html5ever v0.25.2
Compiling derive_more v0.99.17
Compiling phf_macros v0.10.0
Compiling ctor v0.1.26
Compiling darling v0.20.1
Compiling serde_with_macros v3.0.0
Compiling winapi-util v0.1.5
Compiling num-traits v0.2.15
Compiling phf v0.8.0
Compiling hashbrown v0.12.3
Compiling phf v0.10.1
Compiling adler v1.0.2
Compiling windows-metadata v0.39.0
Compiling crc32fast v1.3.2
Compiling same-file v1.0.6
Compiling windows v0.39.0
Compiling windows-bindgen v0.39.0
Compiling vswhom-sys v0.1.2
Compiling num-integer v0.1.45
Compiling simd-adler32 v0.3.5
Compiling winnow v0.4.7
Compiling walkdir v2.3.3
Compiling num-rational v0.4.1
Compiling crossbeam-utils v0.8.16
Compiling heck v0.4.1
Compiling miniz_oxide v0.7.1
Compiling anyhow v1.0.71
Compiling bytes v1.4.0
Compiling string_cache v0.8.7
Compiling url v2.4.0
Compiling serde_with v3.0.0
Compiling toml_datetime v0.6.2
Compiling serde_spanned v0.6.2
Compiling vswhom v0.1.0
Compiling toml_edit v0.19.10
Compiling flate2 v1.0.26
Compiling treediff v4.0.2
Compiling webview2-com-sys v0.19.0
Compiling crypto-common v0.1.6
Compiling json-patch v1.0.0
Compiling block-buffer v0.10.4
Compiling fdeflate v0.3.0
Compiling webview2-com-macros v0.6.0
Compiling rustc_version v0.4.0
Compiling winreg v0.11.0
Compiling kuchiki v0.8.1
Compiling toml v0.7.4
Compiling tao v0.16.2
Compiling bytemuck v1.13.1
Compiling lazy_static v1.4.0
Compiling raw-window-handle v0.5.2
Compiling color_quant v1.1.0
Compiling windows_x86_64_msvc v0.42.2
Compiling png v0.17.9
Compiling image v0.24.6
Compiling digest v0.10.7
Compiling tauri-utils v1.4.0
Compiling embed-resource v2.1.1
Compiling crossbeam-channel v0.5.8
Compiling http v0.2.9
Compiling windows-sys v0.48.0
Compiling slab v0.4.8
Compiling instant v0.1.12
Compiling futures-core v0.3.28
Compiling unicode-segmentation v1.10.1
Compiling wry v0.24.3
Compiling tauri-runtime v0.14.0
Compiling cpufeatures v0.2.8
Compiling futures-task v0.3.28
Compiling sha2 v0.10.7
Compiling tauri-winres v0.1.1
Compiling ico v0.3.0
Compiling cargo_toml v0.15.3
Compiling aho-corasick v0.7.20
Compiling bstr v1.5.0
Compiling tokio v1.28.2
Compiling tempfile v3.6.0
Compiling tauri-runtime-wry v0.14.0
Compiling base64 v0.21.2
Compiling http-range v0.1.5
Compiling pin-project-lite v0.2.9
Compiling futures-util v0.3.28
Compiling tauri-codegen v1.4.0
Compiling globset v0.4.10
Compiling windows-sys v0.42.0
Compiling tauri-build v1.4.0
Compiling filetime v0.2.21
Compiling tauri v1.4.1
Compiling dirs-sys-next v0.1.2
Compiling serialize-to-javascript-impl v0.1.1
Compiling futures-macro v0.3.28
Compiling thread_local v1.1.7
Compiling pin-utils v0.1.0
Compiling fastrand v1.9.0
Compiling num_cpus v1.15.0
Compiling serialize-to-javascript v0.1.1
Compiling ignore v0.4.20
Compiling tar v0.4.38
Compiling tauri-macros v1.4.0
Compiling dirs-next v2.0.0
Compiling serde_repr v0.1.12
Compiling encoding_rs v0.8.32
Compiling state v0.5.3
Compiling open v3.2.0
Compiling spellbook v0.0.0 (C:\Users\carlc\spellbook\src-tauri)
Compiling webview2-com v0.19.1
Finished dev [unoptimized + debuginfo] target(s) in 1m 00s
thread 'main' panicked at 'error while running tauri application: Runtime(CreateWebview(WebView2Error(WindowsError(Error { code: 0x80070002, message: The system cannot find the file specified. }))))', src\main.rs:14:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
🚀 A new version of Tauri CLI is available! [2.0.0-alpha.10]
error Command failed with exit code 101.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\carlc\spellbook> `
Can you try re-installing the webview2 runtime with admin permissions? (the evergreen bootstrapper from here https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section)
Well, that fixed it. There must have been some guide I didn't read to find that, thank you sorry to take your time on that.