Skip to content

fix(test): --experimental-vm-modulesを追加してJest + AWS SDK ESMエラーを修正#778

Merged
j5ik2o merged 3 commits into
mainfrom
fix/ci-experimental-vm-modules
Mar 30, 2026
Merged

fix(test): --experimental-vm-modulesを追加してJest + AWS SDK ESMエラーを修正#778
j5ik2o merged 3 commits into
mainfrom
fix/ci-experimental-vm-modules

Conversation

@j5ik2o
Copy link
Copy Markdown
Owner

@j5ik2o j5ik2o commented Mar 30, 2026

Summary

  • 全パッケージの test スクリプトで @aws-sdk v3 の dynamic import が Jest の vm モジュール経由で呼ばれ ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG エラーが発生していた
  • node --experimental-vm-modules node_modules/.bin/jest --no-cache に変更して解消

対象パッケージ

  • packages/bootstrap
  • packages/infrastructure
  • packages/rmu
  • packages/command/domain
  • packages/command/interface-adaptor-if
  • packages/command/interface-adaptor-impl
  • packages/command/processor
  • packages/query/interface-adaptor

Test plan

  • CI の test ジョブがグリーンになることを確認

🤖 Generated with Claude Code


Note

Low Risk
Changes are limited to test runner configuration and local docker-compose healthchecks, with no production runtime or business logic impact.

Overview
Fixes Jest test execution across packages by updating each package’s test script to run with NODE_OPTIONS=--experimental-vm-modules, addressing ESM/dynamic import failures (notably from @aws-sdk v3) under Jest.

Also updates tools/docker-compose/docker-compose-databases.yml to use a mysqladmin ping healthcheck with explicit timing/retry settings, improving container readiness detection for dependent services.

Written by Cursor Bugbot for commit a5f9714. This will update automatically on new commits. Configure here.

全パッケージのtestスクリプトで@aws-sdk v3のdynamic importによる
ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAGエラーを解消する。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 30, 2026

Image description CodeRabbit


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

node --experimental-vm-modules node_modules/.bin/jest はpnpm環境では
.bin/jestがシェルスクリプトのためSyntaxErrorが発生する。
NODE_OPTIONS=--experimental-vm-modulesを使う方式に変更する。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between c700227 and 7201490 commits.
Files selected (8)
  • packages/bootstrap/package.json (1)
  • packages/command/domain/package.json (1)
  • packages/command/interface-adaptor-if/package.json (1)
  • packages/command/interface-adaptor-impl/package.json (1)
  • packages/command/processor/package.json (1)
  • packages/infrastructure/package.json (1)
  • packages/query/interface-adaptor/package.json (1)
  • packages/rmu/package.json (1)
Files not summarized due to errors (8)
  • packages/command/interface-adaptor-if/package.json (nothing obtained from openai)
  • packages/command/interface-adaptor-impl/package.json (nothing obtained from openai)
  • packages/bootstrap/package.json (nothing obtained from openai)
  • packages/command/domain/package.json (nothing obtained from openai)
  • packages/infrastructure/package.json (nothing obtained from openai)
  • packages/command/processor/package.json (nothing obtained from openai)
  • packages/rmu/package.json (nothing obtained from openai)
  • packages/query/interface-adaptor/package.json (nothing obtained from openai)
Files not reviewed due to errors (8)
  • packages/command/domain/package.json (no response)
  • packages/command/processor/package.json (no response)
  • packages/command/interface-adaptor-if/package.json (no response)
  • packages/command/interface-adaptor-impl/package.json (no response)
  • packages/bootstrap/package.json (no response)
  • packages/infrastructure/package.json (no response)
  • packages/rmu/package.json (no response)
  • packages/query/interface-adaptor/package.json (no response)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

mysql:9.6でMYSQL_PWD方式が非推奨となりヘルスチェックが失敗していた。
mysqladmin pingに変更し、start_periodを追加してMySQL起動完了を待つ。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 7201490 and a5f9714 commits.
Files selected (1)
  • tools/docker-compose/docker-compose-databases.yml (1)
Files not summarized due to errors (1)
  • tools/docker-compose/docker-compose-databases.yml (nothing obtained from openai)
Files not reviewed due to errors (1)
  • tools/docker-compose/docker-compose-databases.yml (no response)
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@j5ik2o j5ik2o merged commit 11e8224 into main Mar 30, 2026
6 checks passed
@j5ik2o j5ik2o deleted the fix/ci-experimental-vm-modules branch March 30, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant