skip to Main Content

I have been building a Next js app with dark mode functionality from shadcn. I followed all steps from shadcn and install all modules but when I run the app, it gives me this error.
I think its because of the lucide-react-icons. I tried fixing but its not.
Any Solutions?

I tried installing lucid react but its not working.

2

Answers


  1. I had same error. The workaround is to downgrade lucide-react to 0.263.1

    npm install [email protected]
    
    Login or Signup to reply.
  2. This is an issue from the new Nextjs upgrade, but there are easy workaround, you can just import from your node modules like:

    import { Sun, Moon } from '../../node_modules/lucide-react';
    Or downgrade your Lucide react to "lucide-react": "0.263.1", just
    npm install [email protected]

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search