-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Vite + Tailwind + PostCSS Import - Internal server error #5647
Comments
Possibly similar issue #1600 |
I've also been experiencing this issue. It can be quite frustrating because it makes it impossible to errors deriving from failed PostCSS compilation. As a workaround, I'm using |
Same here. Ran into the exact same error as described. Prevents me from using Tailwind v3. Using latest versions of everything:
|
ctx._activeId is the original css filewhen err is a error, err.file is the correct reported file by postcss which path needs to be normalized
this doesn't look to be true anymore |
How to fix this issue I have written tailwind CSS classes and followed all the instructions to run the command twice but still, it's not working? help please |
@mahnoork18 fix will be released in 2.8 |
Describe the bug
Start w/ a default Vite (v2.6.14 + React) project. Add tailwindcss and the postcss/postcss-import plugin.
Use an
@import
statement in the main.css
file. If there is an issue in the@import
ed CSS file, an exception will occur in theformatError
function.Run
npm run dev
and load the page. An exception will occur in:formatError
is being called with:Since
ctx._activeId
andctx._activeCode
don't actually reference the location of the error (instead they reference the top-level CSS file that@import
ed the problematic CSS file),generateCodeFrame
ends up crashing.Reproduction
https://github.com/scott-lc/vite-issue-20211111
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: