dD0K
dD0K
TTCTheo's Typesafe Cult
Created by dD0K on 12/31/2024 in #questions
Help with webpack error
Hello! Could anyone that gets nextjs help me understand this error I get when running npm run build:
Failed to compile.

./app/page.tsx + 1 modules
Unexpected end of JSON input


> Build failed because of webpack errors
error: script "build" exited with code 1
Failed to compile.

./app/page.tsx + 1 modules
Unexpected end of JSON input


> Build failed because of webpack errors
error: script "build" exited with code 1
It only happens when I try to link a component from my /app/components directory into my page.tsx. npm run dev works fine with no errors, and deploying on vercel also works fine, it's just building locally that's the issue.
26 replies