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

[BUG] - npm project init creates incorrect tailwind.config.js module export type #148

Open
Neil-Jubinville opened this issue Feb 23, 2025 · 1 comment

Comments

@Neil-Jubinville
Copy link

HeroUI Version

2.4.2

Describe the bug

Using " npx heroui-cli@latest init "

Right after the npm init and install , when trying to 'npm run dev' you will encounter module not found for tailwind.

FIX: tailwind.config.js should generate this for a working module export

import { heroui } from "@heroui/theme";

/** @type {import('tailwindcss').Config} /
const config = {
content: [
"./index.html",
'./src/layouts/**/
.{js,ts,jsx,tsx,mdx}',
'./src/pages//*.{js,ts,jsx,tsx,mdx}',
'./src/components/
/.{js,ts,jsx,tsx,mdx}',
"./node_modules/@heroui/theme/dist/**/
.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
darkMode: "class",
plugins: [heroui()],
};

export default config; // ✅ Use ESM export instead of module.exports

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

see bug desc.

Expected behavior

It should load.

Screenshots or Videos

No response

Operating System Version

windows

Browser

Chrome

@wingkwong wingkwong transferred this issue from heroui-inc/heroui Feb 24, 2025
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

1 participant