https://app.layer0.co/tristan-lee-hr/layer0-stencil-example/env/default/builds/3
Using Layer0 v4.13.9, I have my router configured as follows:
import { Router } from '@layer0/core/router';
export default new Router()
.static('www', {
handler:
file =>
({ cache }) => {
cache({
edge: {
maxAgeSeconds: 60 * 60 * 60 * 365,
forcePrivateCaching: true,
},
browser: {
maxAgeSeconds: 0,
serviceWorkerSeconds: 60 * 60 * 24,
},
});
},
})
.fallback(({ appShell }) => {
appShell('www/index.html');
});
Deployment fails with this error:
2022-05-03T17:03:16Z - internal debug - > VCL to SO compiler n/a failed with error: Error: timeout of 180000ms exceeded
at createError (/var/task/node_modules/axios/lib/core/createError.js:16:15)
at RedirectableRequest.handleRequestTimeout (/var/task/node_modules/axios/lib/adapters/http.js:303:16)
at RedirectableRequest.emit (events.js:400:28)
at RedirectableRequest.emit (domain.js:475:12)
at Timeout.<anonymous> (/var/task/node_modules/follow-redirects/index.js:164:12)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
2022-05-03T17:03:16Z - internal debug - Finished polling userλ logs
2022-05-03T17:03:17Z - internal error - Unknown error during VCL compilation
2022-05-03T17:03:17Z - internal error - Error: Unknown error during VCL compilation
at module.exports (/var/task/src/jobs/compileEdgeCode.js:237:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async module.exports (/var/task/src/jobs/deployBuild.js:126:30)
at async Object.withDir (/var/task/node_modules/tmp-promise/index.js:35:12)
at async handleJob (/var/task/src/jobHandler.js:40:18)
at async module.exports (/var/task/src/jobHandler.js:79:20)
...
2022-05-03T17:03:17Z - error - DeployBuild job failed [unexpected]: Unknown error during VCL compilation
2022-05-03T17:03:17Z - info -
Build failed: DeployBuild job failed [unexpected]: Unknown error during VCL compilation
If I remove the static(...)
call, then deployment succeeds.
I also tried an older version to see if anything changed. Randomly chose 4.6.0 and it succeeds, but took quite a while: Deploying… done (207243ms)