Cypress configs are CommonJS under root "type": "module" and will fail to load
メンテナーはふだん 4 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cypress, javascript, node.js
- 領域
- testing
調査の方向性
まずルートの package.json と cypress/plugins/index.js を読み、issueで説明されているモジュール型の競合を確認してください。Cypressプラグインファイルがどのように読み込まれるかを確認してから、提案されている1行の修正のいずれかを選んでください。ルートのESM設定でプラグインが関数として読み込まれれば完了です。記載されているNodeコマンド、または適切なCypressのチェックで確認してください。
索引モデルが issue の本文から書いたものです。
説明
Found while verifying #2221. Not a regression from that PR — it's pre-existing and currently latent, since no CI job runs Cypress.
The problem
Root package.json declares "type": "module" (re-added in f42f6fce, the ESM test-suite migration). That makes Node treat every .js under the repo root as ESM — including cypress/plugins/index.js, which is still CommonJS (module.exports = (on, config) => {...}).
cypress/support/index.js is comments-only today, so it's currently harmless, but it's in the same trap the moment anyone adds code to it.
Verified on development with Node v24.14.0:
$ node -e "console.log(typeof require('./cypress/plugins/index.js'))"
object
require() returns an empty namespace object instead of the exported function, so anything that loads the plugins file the way Cypress does will get a non-function — the same failure #2221 fixes for github-actions/pr-instructions/.
Suggested fix
Pick one, all are one-liners:
- rename
cypress/plugins/index.js→cypress/plugins/index.cjs(what #2221 does), or - add
cypress/package.jsoncontaining{ "type": "commonjs" }to scope the subtree back to CJS, or - relocate the file under a directory that already has a CJS
package.json.
The cypress/package.json route is the more durable one, since it protects future files added under cypress/ automatically.
Not affected — checked already
shared/roles.jsandshared/authorizationUtils.jsalso containmodule.exports, but they're guarded withif (typeof module !== "undefined" && module.exports)and import each other as ESM, so they load correctly either way.backend/has its ownpackage.jsonwith"type": "module".client/has notypefield, so its CJS configs (postcss.config.js,tailwind.config.js,setupProxy.js) are fine.
The only real breakage in the root tree is the Cypress plugins file.
- 主要言語
- JavaScript
- スター
- 62
- フォーク
- 106
- 平均マージ
- 3日 19時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hackforla/VRMS のほかの issue
-
complexity: small feature: Infrastructure p-feature: User Permissions role: Front End size: 0.25pt
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
-
Login form inputs lack visible focus indicator for keyboard navigation対応中かも @mvanhorn が 171 日前に担当しました。 オープンBug complexity: medium good first issue p-feature: Login role: Front End size: 1pt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信
-
complexity: medium feature: Login role: devops size: 1pt
難易度 2/5 半日 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
complexity: small p-feature: Onboarding role: Front End size: 0.25pt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hackforla/VRMS#2105 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
Backend emails are not being generated from the server in dev or prod対応中かも @geolunalg が 5 日前に担当しました。 オープンBug feature: Infrastructure role: Back End
hackforla/VRMS#2237 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
似ている issue
-
effort:low model:light plan planner:fable-5-1 test-quality tests
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
area: agent area: theme help wanted lane: free-agent roadmap size: S status: needs-brief type: layout type: task
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
arminazimi/slipway#64 ·
-
release:v5.34
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
Jason-Vaughan/TangleClaw#2469 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
hacktoberfest help wanted skip-changelog
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
wassim-azi/agy-powerline#74 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
MadeBaruna/paimon-moe#696 ·