tauri icon indicating copy to clipboard operation
tauri copied to clipboard

yarn tauri dev - The system cannot find the path specified. (os error 3)

Open o-super opened this issue 5 years ago • 5 comments

Hello everyone,

Describe the bug I am running against an error while running the command: yarn tauri dev

To Reproduce execute the following command: yarn tauri dev

Expected behavior Tauri development window should start.

Platform and Versions (please complete the following information):

Operating System - Windows, version 10.0.19041 X64 Webview2 - 90.0.818.56

Node.js environment Node.js - 14.16.0 @tauri-apps/cli - 1.0.0-beta.1 @tauri-apps/api - 1.0.0-beta.1

Global packages npm - 6.14.11 yarn - 1.22.10

Rust environment rustc - 1.52.1 cargo - 1.52.0

Additional context I've setup my project on my C drive but I am still running against the same error. The path showed in the error exists and is correct.

Stack Trace

yarn tauri dev yarn run v1.22.10 $ X:\Projects\MyProject\TheProject\GUI\Tauri\node_modules.bin\tauri dev app:spawn Running "X:\Projects\MyProject\TheProject\GUI\Tauri\node_modules@tauri-apps\cli\bin\tauri-cli.exe tauri dev" +0ms

Compiling app v0.1.0 (X:\Projects\MyProject\TheProject\GUI\Tauri\src-tauri) error: failed to walk directory X:\Projects\MyProject\TheProject\GUI\Tauri\src-tauri\ because IO error for operation on X:\Projects\MyProject\TheProject\GUI\Tauri\src-tauri\ : The system cannot find the path specified. (os error 3) --> src\main.rs:8:10 | 8 | .run(tauri::generate_context!()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile app

I have set up the project with the following commands: yarn init yarn add @tauri-apps/cli yarn tauri init

o-super avatar May 12 '21 23:05 o-super

I think the distDir is not configured on tauri.conf.json, can you check that? it must be a path to the output directory of your assets.

lucasfernog avatar May 13 '21 00:05 lucasfernog

Hello Lucas,

the distDir is setup this way:

"build": { "distDir": "../dist/html", "devPath": " ", "beforeDevCommand": "", "beforeBuildCommand": "" }

My paths are: GUI\Tauri\src-tauri GUI\Tauri\dist\html

o-super avatar May 13 '21 00:05 o-super

The devPath can't be empty since you're running the dev command. We'll improve the error message though.

lucasfernog avatar May 13 '21 02:05 lucasfernog

You can use the same value as distDir or a dev server URL.

lucasfernog avatar May 13 '21 02:05 lucasfernog

It solved the issue thanks Lucas.

o-super avatar May 13 '21 02:05 o-super