@heroicons/react/20/solid Attempted import error: 'createElement' is not exported from 'react'
UtilExe opened this issue · comments
On a Next.js 13 project, I am getting below error:
./node_modules/@heroicons/react/20/solid/esm/AcademicCapIcon.js
Attempted import error: 'createElement' is not exported from 'react' (imported as 'React').
Triggered when I import below:
import { CheckCircleIcon, XMarkIcon } from '@heroicons/react/20/solid'
Hmmm, that's a pretty bizarre error. If createElement
does not exist as an export then JSX will not work. In any case, I'm not seeing this in a freshly created Next.js 13 project. Can you provide a reproduction that we can clone on GitHub?
Hey, gonna close this one since I don't have a way of reproducing this. If you can provide one though leave a comment with it and at-mention me and I'll take a look!
Hey I'm getting the same issue.
./node_modules/@heroicons/react/24/outline/esm/HomeIcon.js
Attempted import error: 'createElement' is not exported from 'react' (imported as 'React').
I'm using the latest 2.1.1.
You can check the error by building the main starter-example here:
npx create-next-app@latest nextjs-dashboard --use-npm --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example"
Go through this chapter:
https://nextjs.org/learn/dashboard-app/navigating-between-pages