Solving Unexpected End of JSON Input

JSON Input

This post provides the solution for the error "Unexpected end of JSON input" that occurs when we run "npm run build" on React Next.

This is a proxy error. You may have problems with your ISP (Internet Service Provider) or your VPN (Virtual Private Network).

Solution

  1. Restart your modem;
  2. Turn off your VPN;

In my case, I called the ISP to reset my modem connection.

To complete, remove the folder node_modules and run "npm install".