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

An ENOENT error due to vite:css. #63

Closed
feremabraz opened this issue Jul 19, 2022 · 5 comments
Closed

An ENOENT error due to vite:css. #63

feremabraz opened this issue Jul 19, 2022 · 5 comments

Comments

@feremabraz
Copy link

feremabraz commented Jul 19, 2022

No matter what I try, I always get this error:

ENOENT: no such file or directory, stat 'index.html'
10:24:34 PM [vite] Internal server error: ENOENT: no such file or directory, stat 'index.html'
  Plugin: vite:css
  File: /home/fernando/Documents/Code/tauri-solid-ts-tailwind-vite/src/index.css

By chance do you happen to have an idea why?

It's strange because the build (I think) looks fine. Can you confirm this?

image

@AR10Dev
Copy link
Owner

AR10Dev commented Jul 28, 2022

I think maybe it's something under Vite that is going wrong but I can confirm the result is the same. Btw you can try the updated template, it uses Vite v3, maybe it solves the error.

@AR10Dev AR10Dev closed this as completed Jul 28, 2022
@feremabraz
Copy link
Author

feremabraz commented Jul 28, 2022

Hi @AR10Dev I forgot to update this issue. I don't remember how I fixed it neither. I created a new project using degit, I should have forked it instead. Thank you for answering!

@aleroza
Copy link

aleroza commented Aug 1, 2022

Hello
I got the same error, but not the same result.
When i'm building app everything works fine, styles are present, but npm run build returns this
image

@AR10Dev
Copy link
Owner

AR10Dev commented Aug 8, 2022

It's related to Tailwind CSS and there's already a pull to fix it

@thecrypticace
Copy link

@AR10Dev I just merged the fix for this. It'll go out in the next tagged release of Tailwind CSS. Ultimately though Tauri is doing something really weird here. Node and most of the code run in it thinks the working directory is one thing but it's actually been changed outside of node. This causes path.resolve() (one way of converting relative paths to absolute paths) to use one path as the working directory and the file system calls to use a different working directory since they result in a syscall.

Tauri should really not be doing this. There should be some split process model so that Tauri doesn't affect the CWD of the node process but of a child process instead. I don't know enough about Tauri but this might be a good issue to open up with them.

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

4 participants