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

Error: cargo install tauri-cli --version "^2.0.0-beta" #9567

Closed
songjiachao opened this issue Apr 25, 2024 · 2 comments
Closed

Error: cargo install tauri-cli --version "^2.0.0-beta" #9567

songjiachao opened this issue Apr 25, 2024 · 2 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@songjiachao
Copy link

songjiachao commented Apr 25, 2024

Describe the bug

Error: cargo install tauri-cli --version "^2.0.0-beta"

Compiling common-path v1.0.0
error[E0308]: mismatched types
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-cli-2.0.0-beta.14\src\helpers\flock.rs:343:28
|
343 | let ret = UnlockFile(file.as_raw_handle(), 0, 0, !0, !0);
| ---------- ^^^^^^^^^^^^^^^^^^^^ expected winapi::ctypes::c_void, found std::ffi::c_void
| |
| arguments to this function are incorrect
|
= note: std::ffi::c_void and winapi::ctypes::c_void have similar names, but are actually distinct types
note: std::ffi::c_void is defined in crate core
--> C:\Users\11091628.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ffi\mod.rs:173:1
|
173 | pub enum c_void {
| ^^^^^^^^^^^^^^^
note: winapi::ctypes::c_void is defined in crate winapi
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\lib.rs:38:5
|
38 | pub enum c_void {}
| ^^^^^^^^^^^^^^^
note: function defined here
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\fileapi.rs:519:12
|
519 | pub fn UnlockFile(
| ^^^^^^^^^^

error[E0308]: mismatched types
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-cli-2.0.0-beta.14\src\helpers\flock.rs:355:28
|
355 | let ret = LockFileEx(file.as_raw_handle(), flags, 0, !0, !0, &mut overlapped);
| ---------- ^^^^^^^^^^^^^^^^^^^^ expected winapi::ctypes::c_void, found std::ffi::c_void
| |
| arguments to this function are incorrect
|
= note: std::ffi::c_void and winapi::ctypes::c_void have similar names, but are actually distinct types
note: std::ffi::c_void is defined in crate core
--> C:\Users\11091628.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\ffi\mod.rs:173:1
|
173 | pub enum c_void {
| ^^^^^^^^^^^^^^^
note: winapi::ctypes::c_void is defined in crate winapi
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\lib.rs:38:5
|
38 | pub enum c_void {}
| ^^^^^^^^^^^^^^^
note: function defined here
--> C:\Users\11091628.cargo\registry\src\index.crates.io-6f17d22bba15001f\winapi-0.3.9\src\um\fileapi.rs:440:12
|
440 | pub fn LockFileEx(
| ^^^^^^^^^^

For more information about this error, try rustc --explain E0308.
error: could not compile tauri-cli (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile tauri-cli v2.0.0-beta.14, intermediate artifacts can be found at C:\Users\11091628\AppData\Local\Temp\cargo-installHbGCgj.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.
PS C:\Users\11091628>

Reproduction

No response

Expected behavior

No response

Full tauri info output

PS C:\Users\11091628> cargo tauri info
error: no such command: `tauri`

        Did you mean `miri`?

        View all installed commands with `cargo --list`
        Find a package to install `tauri` with `cargo search cargo-tauri`
PS C:\Users\11091628>

Stack trace

No response

Additional context

No response

屏幕截图 2024-04-25 154526

@songjiachao songjiachao added status: needs triage This issue needs to triage, applied to new issues type: bug labels Apr 25, 2024
@FabianLars
Copy link
Member

can you check if cargo install tauri-cli --version "^2.0.0-beta" --locked works? (It's about the --locked flag)

@songjiachao
Copy link
Author

it worked, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants