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

Cant Install tailwind with astro anymore... #14291

Closed
erikdemarco opened this issue Aug 29, 2024 · 2 comments
Closed

Cant Install tailwind with astro anymore... #14291

erikdemarco opened this issue Aug 29, 2024 · 2 comments

Comments

@erikdemarco
Copy link

yesterday I successfully install astro with tailwind, using this exact steps from here:

https://tailwindcss.com/docs/guides/astro

Today I ant install anymore. It always shows:

7:35:13 PM [vite] Error when evaluating SSR module /home/Desktop/tmp/astro/my-project/astro.config.mjs: failed to import "@astrojs/tailwind"
|- SyntaxError: [vite] The requested module '@astrojs/tailwind' does not provide an export named 'tailwind'
    at analyzeImportedModDifference (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:51946:15)
    at nodeImport (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:52958:5)
    at async ssrImport (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:52812:16)
    at async eval (/home/Desktop/tmp/astro/my-project/astro.config.mjs:4:31)
    at async instantiateModule (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:52870:5)

[astro] Unable to load your Astro config

[vite] The requested module '@astrojs/tailwind' does not provide an export named 'tailwind'
  Stack trace:
    at analyzeImportedModDifference (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:51946:15)
    at async ssrImport (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:52812:16)
    at async instantiateModule (file:///home/Desktop/tmp/astro/my-project/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:52870:5)
@egel557
Copy link

egel557 commented Aug 29, 2024

This worked for me:

Go to your astro.config.mjs. Then change the tailwind import from import { tailwind } from "@astrojs/tailwind" to import tailwind from "@astrojs/tailwind".

Edit: The same problem happens when installing react in astro. Looks like a bug slipped through in the latest astro release.

@thecrypticace
Copy link
Contributor

thecrypticace commented Aug 29, 2024

Thanks for reporting. It looks like this was fixed earlier today by Astro: withastro/astro#11872

Closing ✨

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

3 participants