Skip to content

Fix build: force ajv@8 to resolve MODULE_NOT_FOUND in react-scripts build#84

Merged
HolimaX merged 1 commit into
feature/Add-Android14-HSGalaxyRing-NFTMintfrom
chunk/fix-ajv-version-conflict
Jun 3, 2026
Merged

Fix build: force ajv@8 to resolve MODULE_NOT_FOUND in react-scripts build#84
HolimaX merged 1 commit into
feature/Add-Android14-HSGalaxyRing-NFTMintfrom
chunk/fix-ajv-version-conflict

Conversation

@circleci-app

@circleci-app circleci-app Bot commented Jun 3, 2026

Copy link
Copy Markdown

Summary

  • Job 405 failed with Error: Cannot find module 'ajv/dist/compile/codegen'
  • Root cause: ajv-keywords@5 (a transitive dep of react-scripts@5/webpack5) requires ajv@8, but --legacy-peer-deps allows ajv@6 to be installed instead, causing the module lookup to fail at build time
  • Fix: add an explicit npm install ajv@^8.12.0 --legacy-peer-deps step immediately after the main npm i, ensuring the correct ajv version is on disk before the build runs

Test plan

  • CI build step CI=false && npm run prestart && npm run build-nix --verbose passes without the ajv/dist/compile/codegen error
  • Existing test step continues to pass

https://app.circleci.com/agents/gh/HolimaX/chat/88624cff-315b-46a8-b738-b3e1b52da150

ajv-keywords@5 (used by react-scripts@5/webpack5) requires
ajv@8's codegen API (ajv/dist/compile/codegen), but --legacy-peer-deps
allows ajv@6 to be installed, causing the build to fail with
"Cannot find module 'ajv/dist/compile/codegen'".

Add an explicit `npm install ajv@^8.12.0` step after the main
install to ensure the correct version is present.
@HolimaX HolimaX merged commit 20c8ab6 into feature/Add-Android14-HSGalaxyRing-NFTMint Jun 3, 2026
1 of 6 checks passed
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