When I deploy to production, I get this error

I had a working website. After I made changes to add new pages to the website, and tried Publishing to production, I get this error message

Failed to execute ‘json’ on ‘Response’: Unexpected end of JSON input.

Any help to fix this error, will be much appreciated. Thanks for your help

This error happens when you do Response.json(body) but supply something other than JSON for the body

If you can find where in the code Response.json is used (it should be safe to narrow down to the new pages you’ve added), try to log the response body to see what you’re actually working with