-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
HeroUI Version
2.8.9
Describe the bug
Rather a work around than a bug report.
I definitely followed the official documentation to set up Hero UI, but I got the following warning after set up Hero UI with Next.js v16 and tailwindcss v4.
(node:17170) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/key5n/dev/heroui-nextjs-app/hero.ts?id=1771298920789 is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /Users/key5n/dev/heroui-nextjs-app/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
You can eliminate this message with
"type": "module"in `package.json" as the message tells- renaming
hero.tstohero.mts
I prefer hero.mts rather attaching "type": "module".
This warning shows even on a template created with npx heroui-cli init.
I hope this warning would be resolved.
Full Console Logs:
❯ npm run dev
> heroui-nextjs-app@0.1.0 dev
> next dev
▲ Next.js 16.1.6 (Turbopack)
- Local: http://localhost:3000
- Network: http://133.68.131.188:3000
✓ Starting...
✓ Ready in 607ms
(node:17170) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/key5n/dev/heroui-nextjs-app/hero.ts?id=1771298920789 is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /Users/key5n/dev/heroui-nextjs-app/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
GET / 200 in 1688ms (compile: 1600ms, render: 87ms)
You can reproduce this warning in my repository: https://github.com/Key5n/heroui-nextjs-app
Your Example Website or App
https://github.com/Key5n/heroui-nextjs-app
Steps to Reproduce the Bug or Issue
- clone my repo
npm installnpm run dev- The warning shows on console
Expected behavior
No warning shows
Screenshots or Videos
Operating System Version
macOS
Browser
Firefox
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels