Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
5 replies
codefork

'use client' directive throws error

Steps:
1. npx create-next@latest
2. accept app dir usage
3. create client component with 'use client' directive at the top
4. import and use client component in default home page
5. npm run dev
6. I get unhadled runtime error, "undefined is not valid JSON"
7. when I remove the "use client" directive everything works
image.png
image.png
image.png
Was this page helpful?