Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] tauri dev -c flag error #4067

Closed
Orgil opened this issue May 6, 2022 · 5 comments
Closed

[bug] tauri dev -c flag error #4067

Orgil opened this issue May 6, 2022 · 5 comments

Comments

@Orgil
Copy link

Orgil commented May 6, 2022

Describe the bug

yarn tauri dev -c file.json gives me below error

Error running CLI: No such file or directory (os error 2)

if i pass json string it is working as expected.

Reproduction

No response

Expected behavior

passing json file path to cli should properly merge config

Platform and versions

Environment
  › OS: Mac OS 11.6.5 X64
  › Node.js: 14.18.1
  › npm: 6.14.15
  › pnpm: Not installed!
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.59.0
  › cargo: 1.59.0
  › Rust toolchain: stable-x86_64-apple-darwin

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.9
  › @tauri-apps/api [NPM]: 1.0.0-rc.4
  › tauri [RUST]: 1.0.0-rc.8,
  › tauri-build [RUST]: 1.0.0-rc.7,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.15.1,

Stack trace

No response

Additional context

No response

@Orgil Orgil added the type: bug label May 6, 2022
@FabianLars
Copy link
Member

Hmm generally it should work. Is that json file next to your tauri.conf.json? (That's where the cli should look for)

@Orgil
Copy link
Author

Orgil commented May 7, 2022

json file is under src-tauri folder. if i put content of file as string, it works.

@Orgil
Copy link
Author

Orgil commented May 7, 2022

My json file is under src-tauri folder. I ran yarn tauri dev -c ./src-tauri/file.json it gives error. If i cd into src-tauri then run yarn tauri dev -c file.json it works. It gives error from the root of the project.

@lucasfernog
Copy link
Member

I found a inconsistency between the dev and build command, i'll change both to look for the file relative to the CWD.

Seems weird that your CWD is changing yarn behavior since yarn should change CWD to your project root.

@lucasfernog
Copy link
Member

lucasfernog commented May 7, 2022

So in the current CLI yarn tauri dev -c file.json and yarn tauri build -c src-tauri/file.json should work if $PROJECT_DIR/src-tauri/file.json exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants