Summary
The @marko/serve browser-based autotests (packages/serve/test/index.test.js) fail in CI. The failures are pre-existing toolchain bit-rot, unrelated to any recent feature work — they surfaced while looking at CI for an unrelated PR (#227). The underlying build pipeline is fine (a webpack build produces dist/middleware.js and the dev-server serves a 200 on Node ≥18); the breakage is entirely in the browser test harness and its dependencies.
Prerequisite: CI can't currently run at all
The CI matrix runs on Node 12.x/14.x/15.x, which ship npm 6. npm 6 predates workspaces, so the root npm install never installs the per-package dependencies and the suite dies early with Cannot find module 'mz/fs'. These versions also no longer satisfy the @marko/* engine requirements (18 || 20 || >=22). Bumping the matrix to 18.x/20.x/22.x is a prerequisite for any of the work below to be observable in CI.
The three failure layers (reproduced locally on Node 22)
-
Puppeteer's bundled Chromium won't launch in CI. puppeteer is pinned at 5.5.0, whose bundled Chromium is from 2020 and fails to launch/navigate on the current ubuntu-latest image → every serve test times out (Navigation timeout of 30000 ms exceeded). Pointing a modern Chromium at the suite locally makes the browser work and ~21/30 pass, which is a completely different signature — confirming the CI-specific cause is the old browser.
-
Stale HTML snapshots. Even with a working browser, the webpack output has drifted — e.g. an extra <script … async> chunk tag now appears that isn't in the expected *-expected.html snapshots → snapshot mismatches. The expected snapshots need regenerating after the toolchain is updated.
-
Static param-route regression. The static variant navigating to a dynamic param route (e.g. /blog/123?foo=bar) fails with net::ERR_HTTP_RESPONSE_CODE_FAILURE (fixtures params-and-queries, params-and-queries-deprecated). This looks like a genuine functional regression in static generation / routing for parameterized routes, not just a snapshot diff, and needs investigation.
Suggested approach
Note: @marko/create and @marko/migrate tests are unaffected and pass once dependencies install.
Summary
The
@marko/servebrowser-based autotests (packages/serve/test/index.test.js) fail in CI. The failures are pre-existing toolchain bit-rot, unrelated to any recent feature work — they surfaced while looking at CI for an unrelated PR (#227). The underlying build pipeline is fine (a webpack build producesdist/middleware.jsand the dev-server serves a 200 on Node ≥18); the breakage is entirely in the browser test harness and its dependencies.Prerequisite: CI can't currently run at all
The CI matrix runs on Node
12.x/14.x/15.x, which ship npm 6. npm 6 predates workspaces, so the rootnpm installnever installs the per-package dependencies and the suite dies early withCannot find module 'mz/fs'. These versions also no longer satisfy the@marko/*engine requirements (18 || 20 || >=22). Bumping the matrix to18.x/20.x/22.xis a prerequisite for any of the work below to be observable in CI.The three failure layers (reproduced locally on Node 22)
Puppeteer's bundled Chromium won't launch in CI.
puppeteeris pinned at5.5.0, whose bundled Chromium is from 2020 and fails to launch/navigate on the currentubuntu-latestimage → every serve test times out (Navigation timeout of 30000 ms exceeded). Pointing a modern Chromium at the suite locally makes the browser work and ~21/30 pass, which is a completely different signature — confirming the CI-specific cause is the old browser.Stale HTML snapshots. Even with a working browser, the webpack output has drifted — e.g. an extra
<script … async>chunk tag now appears that isn't in the expected*-expected.htmlsnapshots → snapshot mismatches. The expected snapshots need regenerating after the toolchain is updated.Static param-route regression. The
staticvariant navigating to a dynamic param route (e.g./blog/123?foo=bar) fails withnet::ERR_HTTP_RESPONSE_CODE_FAILURE(fixturesparams-and-queries,params-and-queries-deprecated). This looks like a genuine functional regression in static generation / routing for parameterized routes, not just a snapshot diff, and needs investigation.Suggested approach
18.x/20.x/22.x(and consideractions/checkout/actions/setup-nodev4).puppeteerto a currently-supported major (API changes expected) so a working Chromium launches in CI.webpack-dev-serverv3 → v4/v5 to matchwebpack@5and adaptpackages/serve/src/index.js(it currently uses the v3 API:new DevServer(compiler, config),server.listen(port, host, cb), and v3-only options likecontentBase/noInfo/disableHostCheck/injectClient/clientLogLevel).*-expected.htmlsnapshots once the above are in place.ERR_HTTP_RESPONSE_CODE_FAILURE.Note:
@marko/createand@marko/migratetests are unaffected and pass once dependencies install.