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

Strange build errors, but only if src-tauri/target/release folder already exists #10109

Closed
Dylan190774 opened this issue Jun 24, 2024 · 3 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@Dylan190774
Copy link

Describe the bug

I added Tauri to an existing fresh Quasar project.
yarn tauri dev works great now.

However, yarn tauri build only succeeds the first time.
When I try it for the second time, it gives all kinds of weird errors, like :

src-tauri/target/release/build/app-cfcf12468c148780/out/tauri-codegen-assets/b55b3654b8ae09ecef9d94c6779bbb7dd3b5000505c861ffe50d5ca1ab489898.js:96:114 - error TS1137: Expression or comma expected.

96 =�C��☼�ȕ�����\�#rپO�♥�☺�\H�J{��똚���↨�\�c^�W�[-?:▲å���↓�g4♥��8�↕�s���G����8��|�;|���8o[c�[n�:?�^♥�N��8:☻�1e^→��‼i���sn`cϚTV��v2��|�q�♠.�m�ky'��ӆU����o�Һ>G�,�q�6��¶>▼��q♦�5�ɟ☼:▲�}<�Y���?�)���L�o�oLO�h��7$+↨n↕§������►T����V�►�R�<����

src-tauri/target/release/build/app-cfcf12468c148780/out/tauri-codegen-assets/b55b3654b8ae09ecef9d94c6779bbb7dd3b5000505c861ffe50d5ca1ab489898.js:96:115 - error TS1127: Invalid character.      

It seems that if src-tauri/target/release/build already exists the errors occur. But if I remove this, the build takes very long again, so this is not really an option.
I added /src-tauri to .eslintignore, since I saw some errors that contained eslint , but this didn't solve the problem with the build.

Any idea what could cause this behaviour?

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 126.0.2592.68
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.11.1
    - yarn: 1.22.21
    - npm: 8.6.0

[-] Packages
    - tauri [RUST]: 1.6.8
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.6
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist/spa
    - devPath: http:https://localhost:9000/
    - framework: Vue.js (Quasar)
    - bundler: Vite

Stack trace

No response

Additional context

Windows 10
Node 20.11.1
Quasar 2.15.2
Vite 5.2.7

@Dylan190774 Dylan190774 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jun 24, 2024
@Dylan190774
Copy link
Author

I did some more tests, and the problem seems definitely to be caused by eslint.

When I create a Quasar app that doesn't use eslinting, the errors do not occur.

However, of course I would like to be able to have eslint enabled.

@Dylan190774
Copy link
Author

Found a solution!
I had to add src-tauri to the exclude-section in tsconfig.json as well!
Now yarn tauri build works like a charm,too!

Hope this helps someone who uses Quasar, Vite, ESlint and Tauri in the same project :)

@amrbashir
Copy link
Member

Thanks for the investigation, I will close the issue since it is related to your frontend configuration and not a bug in tauri.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
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