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

Astro with Tailwind integration failed to start on StackBlitz.com #13249

Open
1 task done
ngtankhoa opened this issue Feb 14, 2025 · 5 comments
Open
1 task done

Astro with Tailwind integration failed to start on StackBlitz.com #13249

ngtankhoa opened this issue Feb 14, 2025 · 5 comments
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: errors Related to error handling / messages (scope)

Comments

@ngtankhoa
Copy link

Astro Info

the command returns no data.

npm run astro info

> @example/[email protected] astro
> astro info

If this issue only occurs in one browser, which browser is a problem?

It only fails on stackblitz.com

Describe the Bug

The project runs fine on my machine, but on StackBlitz, as soon as I imported @tailwindcss/vite into astro.config.mjs, the project refused to start. It failed silently—no errors, no warnings. Even astro info returns nothing.

What's the expected result?

The project should start on StackBlitz, or at least print an error message if it fails.

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/ngtankhoa/withastro-astro-banrd5uv

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 14, 2025
@florian-lefebvre
Copy link
Member

@ngtankhoa
Copy link
Author

@florian-lefebvre Yes, and as I mentioned above, I noticed that simply importing @tailwindcss/vite (without using it yet) results in an error.
I don’t know if this helps, but when I run npm run astro info --verbose, I get this information:

npm verb cli /usr/local/bin/node /usr/local/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verb title npm run astro info
npm verb argv "run" "astro" "info" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/home/.npm/_logs/2025-02-15T11_04_04_977Z-
npm verb logfile /home/.npm/_logs/2025-02-15T11_04_04_977Z-debug-0.log

> @example/[email protected] astro
> astro info

@florian-lefebvre
Copy link
Member

Can you try to import the vite plugin in a plain vite app on stackblitz? The issue may not be with Astro directly

@ngtankhoa
Copy link
Author

I tested with a plain Vite app and the Tailwind plugin on StackBliz: https://stackblitz.com/edit/vitejs-vite-j87xt5ex?file=vite.config.ts . The Vite app also failed to start on StackBliz (the same code runs fine locally), but it show an explicit error message.
Since the Astro app doesn't return any error message, I can't tell whether it has the same issue as the plain Vite app.
So, although - as you said - the issue may not be with Astro directly, I think Astro is still responsible for printing out any error messages.

@florian-lefebvre
Copy link
Member

Alright thanks for confirming! So this issue will be about surfacing the related error better then

@florian-lefebvre florian-lefebvre added - P3: minor bug An edge case that only affects very specific usage (priority) feat: errors Related to error handling / messages (scope) and removed needs triage Issue needs to be triaged labels Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: errors Related to error handling / messages (scope)
Projects
None yet
Development

No branches or pull requests

2 participants