Next.js Discord

Discord Forum

createContext error

Unanswered
Patterdale Terrier posted this in #help-forum
Open in Discord
Patterdale TerrierOP
I was using NextJS v16.1 to build a project, and whenever I imported an Icon from Lucide-react, it worked fine without me adding "use client"...

I got another project I started working on but it was after NextJS 16.2 was released, in this project, in any file I import any icon from lucide -react, I always get an error, needing me to add "use-client" to that file. I don't know if it's me doing something wrong or it's a new feature in the new version of NextJS

Anyone else facing this?

5 Replies

Skye Terrier
Is lucide-react version same on both the projects ?
@Skye Terrier Is lucide-react version same on both the projects ?
Patterdale TerrierOP
No...the first project has Lucide-react version 0.577.0
The second project has version 1.0.0
Patterdale TerrierOP
Next is 16.2.1
Lucide-react 1.0.0-rc.0
Patterdale TerrierOP
Solved now. The issue was the version of Lucide-react I was using... I upgraded to version 1.60 and it's all working very fine now
Skye Terrier
Cool