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

[postcss] ENOENT: no such file or directory, stat './index.html' #7

Closed
112RG opened this issue Sep 25, 2022 · 4 comments
Closed

[postcss] ENOENT: no such file or directory, stat './index.html' #7

112RG opened this issue Sep 25, 2022 · 4 comments

Comments

@112RG
Copy link

112RG commented Sep 25, 2022

Hi! First, of thank you for this handy plugin it really cleans up my package.json and shrinks my deps. But I am having an issue getting to working on Linux. Now on windows, it works fine. But I am unable to get it working on Linux + MacOSX. My repo for this project is located here https://github.com/Ortygia/Orpheus
I am sorry to say this is all I have to help you on figuring out the issues

⋊> ~/p/Orpheus on master ◦ npm run dev                                                                                                                                                                                         03:03:52

> orpheus@0.0.0 dev
> vite-tauri dev

[vite-plugin-tauri]  Starting Vite dev server...
[vite-plugin-tauri]  Vite dev server started.
[vite-plugin-tauri]  Starting Tauri...
        Info Watching /home/rylee/projects/Orpheus/src-tauri for changes...
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s

🌼 daisyUI components 2.27.0  https://github.com/saadeghi/daisyui
  ✔︎ Including:  base, components, themes[29], utilities


🌼 daisyUI components 2.27.0  https://github.com/saadeghi/daisyui
  ✔︎ Including:  base, components, themes[29], utilities

3:03:55 AM [vite] Internal server error: [postcss] ENOENT: no such file or directory, stat './index.html'
  Plugin: vite:css
  File: /home/rylee/projects/Orpheus/src/index.css
      at Object.statSync (node:fs:1596:3)
      at resolveChangedFiles (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:117:36)
      at resolvedChangedContent (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:101:29)
      at /home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:163:44
      at /home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
      at plugins (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/index.js:33:63)
      at LazyResult.runOnRoot (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:339:16)
      at LazyResult.runAsync (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:393:26)
      at LazyResult.async (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:221:30)
      at LazyResult.then (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:206:17)
[postcss] ENOENT: no such file or directory, stat './index.html'
3:03:56 AM [vite] Internal server error: [postcss] ENOENT: no such file or directory, stat './index.html'
  Plugin: vite:css
  File: /home/rylee/projects/Orpheus/src/index.css
      at Object.statSync (node:fs:1596:3)
      at resolveChangedFiles (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:117:36)
      at resolvedChangedContent (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:101:29)
      at /home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:163:44
      at /home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
      at plugins (/home/rylee/projects/Orpheus/node_modules/tailwindcss/lib/index.js:33:63)
      at LazyResult.runOnRoot (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:339:16)
      at LazyResult.runAsync (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:393:26)
      at LazyResult.async (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:221:30)
      at LazyResult.then (/home/rylee/projects/Orpheus/node_modules/postcss/lib/lazy-result.js:206:17)
@amrbashir
Copy link
Owner

the error logs shows that this is a vite error and it got nothing to do with this plugin. You can confirm that by running vite without the tauri app, for your case it is npm run build:vite or npm run dev:vite

@112RG
Copy link
Author

112RG commented Sep 25, 2022

Yes and using those commands the build runs fine and can find the index.html. It only happens when using this plugin. That is why I have posted the error here

@amrbashir
Copy link
Owner

amrbashir commented Sep 26, 2022

I really don't know why this happens, I tested with a fresh project and it worked fine. Can you try to make a minimal repro?

The plugin doesn't do anything special, it merely starts the serve with two options disabled clearScreen and open which are irrelevant to this bug.

The logs indicate that it is a bug in the postcss plugin in vite, when the server is started programatically.

@amrbashir
Copy link
Owner

The plugin has been refactored as a proper vite plugin now, please update to v3 and follow the new README.md

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

2 participants