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

create-tauri-app multiple templates are broken #261

Closed
Jagholin opened this issue Dec 11, 2022 · 8 comments
Closed

create-tauri-app multiple templates are broken #261

Jagholin opened this issue Dec 11, 2022 · 8 comments
Labels
bug Something isn't working status: upstream

Comments

@Jagholin
Copy link

Link to discord discussion: https://discord.com/channels/616186924390023171/1051492348707741787

problem description: not much to say, other than I try to create a tauri app using this tool. So far, Ive tried react, react-js, vue templates with the same problem(compiled program shows blank window).

commands that i run:

cargo create-tauri-app
 (choose package manager: npm)
npm install
npm run tauri dev

No errors are produced. Opening dev tools -> JS console always shows an error , different in each project type(see discord thread link for examples)

All prerequisits from https://tauri.app/v1/guides/getting-started/prerequisites are installed. I didnt install pnpm or yarn, since they are alternatives to npm

cargo create-tauri-app --version outputs 2.7.2

Example of the problem, using Vue
grafik

Tauri info output:
grafik

@amrbashir
Copy link
Member

Can't seem to reproduce the issue. The problem is in building the front-end, try removing node_modules and clearing the global npm cache. Also try running npm run dev and open it in the browser and see if anything is wrong.

@Jagholin
Copy link
Author

did both (npm cache clean --force and removing node_modules with package-lock.json), no effect.

npm run dev also shows empty page in the browser with the same error in the devtools console.

@amrbashir
Copy link
Member

amrbashir commented Dec 11, 2022

well, this is a problem with the bundler (vite) and I am not yet able to reproduce it and seems very specific to your machine. can you try npm create vite@latest, choose a template and run it in the browser?

@Jagholin
Copy link
Author

Ok, I've tried 2 project types:
react with JavaScript
vue with TypeScript

both run well(see screenshot from vue template)
grafik

@Jagholin
Copy link
Author

Huh now tauri seems to work too... I guess the only thing thats different is npm create vite@latest somehow seems to fix stuff...

I guess i close this issue

@Jagholin
Copy link
Author

I'm reopening this issue due to some new information.

So a bit of background - I have a HDD and a SSD on my pc. SSD is the smaller one (~500gb) so I only use it for Windows and some frequently-used big programs. Most of the Users folder like documents downloads etc. are on the HDD, except for one thing - some folders are placed physically on SSD but are linked using NTFS junctions with a folder in HDD. One of these special folders is where I usually place rust projects - due to how much drive access is used during compilation I like the boost that placing this folder on SSD gives me. So the whole thing looks something like this:

C:  <- this is SSD
 | --   accelerate_linked
 |         | -- rust 
 |         | -- .cargo, .rustup are also here

D: <- this is HDD
 | --  Users/UserName directory
 |        | -- rust    -> links to C:\accelerate_linked\rust
 |        | -- webdev  -  just a normal folder
 |        | -- documents  and other stuff

so let us see what happens shall we? this is the experiment:

1. cd to D:\Users\rust directory. 
2. run cargo create-tauri-app
3. select something like package manager: npm, project type: react-ts
4. cd into the project directory
5. npm install && npm run tauri dev

result: blank window.

6. take the project folder and copy it somewhere else (d:\Users\webdev)
7. cd into the copied folder
8. npm run tauri dev (!!)

result: everything works

9. cd into C:\accelerate_linked\rust\project folder
10. npm run tauri dev

result: everything is fine

So this appears to be a bug, right?... the question is only where

@Jagholin Jagholin reopened this Dec 12, 2022
@Jagholin
Copy link
Author

huh appears to be vite bug vitejs/vite#10802

@amrbashir
Copy link
Member

thanks for taking the time to track this down. gonna close this issue and hopefully the vite team will fix it soon.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@amrbashir amrbashir added bug Something isn't working status: upstream labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: upstream
Projects
None yet
Development

No branches or pull requests

2 participants