Playwright container fails `devEngines` check again because its image does not pin Node.js

未关闭
#782 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@bedrich-schindler 已经在做这个了。

开始于 2026年11月4日。

  • #785 来自 @bedrich-schindler —— 未关闭

评估

难度
4/5
预计耗时
1-2 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, nodejs, playwright, typescript
领域
devops, testing

调研方向

The Node.js version comes from the Playwright base image used in docker/playwright/Dockerfile, and CI pins its own version in .github/workflows/playwright.yml. Start by comparing the node version the playwright service reports with the devEngines.runtime range, then decide how to pin it, since the issue lists three options and the choice is open. Done means npm run test:playwright-ct:all passes inside the playwright service on a Node version allowed by devEngines.

由索引模型根据 Issue 内容生成。

描述

bug maintenance

Problem

Running component tests locally in the devcontainer fails before any test starts:

$ npm run test:playwright-ct:all
npm error code EBADDEVENGINES
npm error EBADDEVENGINES Invalid devEngines.runtime
npm error EBADDEVENGINES Invalid semver version "^22.23.0 || ^24.17.0" does not match "v26.13.0" for "runtime"

This also blocks npm run test:playwright-ct:all-with-update and the checks
in the /commit skill. The tests themselves pass when started without npm.

Cause

Same root cause as #738, which was closed by aligning versions rather than by
pinning Node.js in the playwright service.

Source Node.js
devEngines.runtime ^22.23.0 || ^24.17.0
node service (node:24.22.1) v24.22.1
playwright service (playwright:v1.64.1) v26.13.0
CI (actions/setup-node) 24.17

docker/playwright/Dockerfile takes Node.js from the Playwright image, which
has deb.nodesource.com/node_26.x configured.

Not explained yet: utils/docker/Dockerfile.noble at the Playwright v1.64.1
tag still has ARG NODE_VERSION=24, and the node binary in the image is dated
2026-10-28, after the update to this image on 2026-10-26. The tag may have been
republished, so the Node.js version can change without any change in this
repository. v1.64.1 and v1.64.1-noble currently resolve to the same digest,
so switching to -noble would not help.

Why CI passes

.github/workflows/playwright.yml runs actions/setup-node, which puts
Node.js 24.17 ahead of the image's Node.js. The local playwright service has
no such step. CI also still uses playwright:v1.63.0-noble, while
@playwright/test is on ~1.64.1.

Steps to reproduce

  1. docker compose up -d --build
  2. docker compose exec -T devcontainer npm run test:playwright-ct:all

Expected behavior

Component tests run locally in the playwright service, on a Node.js version
allowed by devEngines, however the upstream image changes.

Possible solutions

  1. Install pinned Node.js and npm in docker/playwright/Dockerfile, e.g. copy
    them from the node image in a multi-stage build, as proposed in #738.
  2. Keep Node.js and npm versions in one place so that the services and workflows
    cannot drift apart.
  3. Add ^26 to devEngines.runtime. This is the smallest change, but it allows
    Node.js 26 for all development and the problem returns with the next upstream
    change.
主要语言
TypeScript
星标
23
派生
10
平均合并
5 天 12 小时
30 天内合并 PR
9

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react-ui-org/react-ui 的其他 Issue

查看 react-ui-org/react-ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。