Skip to content

Commit

Permalink
Update error server with GOV.UK Frontend v5 paths
Browse files Browse the repository at this point in the history
I’m aware we have `nunjucksPaths` in **govuk-prototype-kit.config.json** but the error server doesn’t use it
  • Loading branch information
colinrotherham committed Aug 22, 2023
1 parent fcda7c8 commit 592ea50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/errorServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ function runErrorServer (error) {
try {
const nunjucksAppEnv = getNunjucksAppEnv([
path.join(__dirname, 'nunjucks'),
path.join(packageDir, 'node_modules', 'govuk-frontend'),
path.join(packageDir, 'node_modules', 'govuk-frontend', 'dist'),
path.join(process.cwd(), 'node_modules', 'govuk-frontend', 'dist'),

// Fall back to GOV.UK Frontend legacy search path (without `/dist` suffix)
path.join(process.cwd(), 'node_modules', 'govuk-frontend')
])
res.end(nunjucksAppEnv.render('views/error-handling/server-error', getErrorModel(error)))
Expand Down

0 comments on commit 592ea50

Please sign in to comment.