stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

404 Pages Giving Server Error

Open dettmartin opened this issue 4 years ago • 0 comments

Expected behavior

Render the 404 page as it would appear on the live site.

Actual behavior

Raw JSON response: {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}

Steps to reproduce behavior

Run stencil start Navigate to http://localhost:3000/giveme404

Problem

The server/plugins/renderer/renderer.module.js:240 is throwing an exception trying to run forEach on an undefined regionResponse.renderedRegions.

Resolution

For my local environment, I changed server/plugins/renderer/renderer.module.js:208 from let regionResponse = []; to let regionResponse = {renderedRegions: []};

dettmartin avatar Jul 29 '21 17:07 dettmartin