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 on tauri project #10859

Closed
Anivie opened this issue Sep 11, 2023 · 3 comments
Closed

Error on tauri project #10859

Anivie opened this issue Sep 11, 2023 · 3 comments

Comments

@Anivie
Copy link

Anivie commented Sep 11, 2023

Environment

  • IntelliJ Rust plugin version: 0.4.200.5421-232
  • Rust toolchain version: 1.72.0 (5680fa18f 2023-08-23) x86_64-pc-windows-msvc
  • IDE name and version: CLion 2023.2.1 (CL-232.9559.58)
  • Operating system: Windows 11.0
  • Macro expansion: enabled
  • Additional experimental features: org.rust.macros.proc.attr

Problem description

Wrong code tip: Clion reports that there is an error in the code, but in fact the code is correct
image

Steps to reproduce

Use cargo create-tauri-app -> Use TS as frontend -> pnpm -> Vue
Import project to Clion

@Maksim20023
Copy link
Collaborator

Hi! Thank you for the report.
I reproduce this issue, but this warning is observed only if the external linter is turned on.
Could you please specify if you use an external linter?
If I understand correctly, this warning is related to the peculiarities of the project checking performed in the IDE. Please take a look at this discussion on the Tauri issue tracker: tauri-apps/tauri#3142
As a workaround to avoid warning, you can create 'dist' directory in the project's root. Please try to do it and write a response, whether it helped.

@Anivie
Copy link
Author

Anivie commented Sep 13, 2023

Thanks for your help, this error report disappeared after I created the directory.
However, I found that this problem did not occur in the following scenarios:

  • Run cargo check manually in the project directory
PS C:\Users\anivi\OneDrive\Document\Desktop\tauri-app\src-tauri> cargo check
    Checking tauri v1.4.1
    Checking tauri-app v0.0.0 (C:\Users\anivi\OneDrive\Document\Desktop\tauri-app\src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 2.22s
  • Import the project in VSCode

@dbidwell94
Copy link

Hey, OP :) This is not an error with RustRover. This is because you have not yet generated your dist folder. Do so by running a build on the TS/JS side of the application. For example: npm run build instead of npm run tauri build

@Anivie Anivie closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants