Locally Replicating Page Deploy Errors

If you are running into deploy errors while building on Pages, you can locally replicate the errors for each entity page to receive a more detailed error message for better debugging.

Start by running a local build on your desktop of the pages with npm run dev. This starts a local development server in dynamic mode, which means you can go to any entity’s slug to test the generation for the entities that are failing. Once you have spun up the local development server, you can go to any entity’s page by adding the slug to localhost:5173 in the URL. If pagesjs runs into an error generating the page, you will be able to view the error message in your terminal.

This can be done in local production mode as well by performing the following steps:

  1. Generate test data for the bad entity yext pages generate-test-data --entityIds [entityId] --featureName [featureName]
    (ex. yext pages generate-test-data --entityIds 2370 --featureName index )
  2. Generate the site with a production build: yext pages generate