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

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
HolimaX added a commit that referenced this pull request Sep 8, 2026
* #DEV-2 - Added support for Service Tags, WebManifest Protocol Handlers and HealthyMe Android App by HealthDash, Added automated MAN generation on Linux, AWS S3 to fallback to CD or Demo resources, Added AWS Secret Manager support for .env storage

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* Updated config.yml

* #CICD-1 - CircleCI build fix attempt #1

* Updated config.yml

* Updated config.yml

* Updated config.yml

* #CICD-1 - CircleCI build fix attempt #2

* #CICD-1 - CircleCI build fix attempt #3

* #CICD-1 - CircleCI build fix attempt #4

* #CICD-1 - CircleCI build fix attempt #5

* #CICD-1 - CircleCI build fix attempt #6

* #CICD-1 - CircleCI build fix attempt #7

* Fix build: add --legacy-peer-deps to npm install (#83)

* Fix npm install ERESOLVE peer dependency conflict

react-router@7.15.0 requires react>=18 but project uses react@16.14.0.
Add --legacy-peer-deps to npm i --save to bypass strict peer resolution.

* Add Node.js 18.x to CI workflow matrix

Signed-off-by: Linards <33150232+HolimaX@users.noreply.github.com>

---------

Signed-off-by: Linards <33150232+HolimaX@users.noreply.github.com>
Co-authored-by: circleci-app[bot] <127350680+circleci-app[bot]@users.noreply.github.com>
Co-authored-by: Linards <33150232+HolimaX@users.noreply.github.com>

* Fix build: force ajv@8 to resolve MODULE_NOT_FOUND error (#84)

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.

Co-authored-by: circleci-app[bot] <127350680+circleci-app[bot]@users.noreply.github.com>

* #DEV-2 - feat: update package version and dependencies, enhance authentication flow

- Bump version to 0.1.14 and update versionName to 14 in package.json
- Add new configuration options for ads and Google Analytics
- Upgrade dependencies including Okta SDK and FontAwesome
- Refactor authentication components to use withOktaAuth HOC
- Implement Google Analytics event tracking for login and registration attempts
- Add warning for missing Okta configuration in App component
- Improve user experience with enhanced registration and login forms
- Introduce CI workflow for linting and testing on push and pull requests

* fix: pin react-adsense to ^0.1.0 (^0.1.3 does not exist on npm) (#85)

The latest published version of react-adsense is 0.1.0; version 0.1.3
was never released, causing ETARGET errors during npm install.
Downgrade the version constraint to resolve the install failure.

AI-Generated: true

Co-authored-by: circleci-app[bot] <127350680+circleci-app[bot]@users.noreply.github.com>

* #DEV-2 - Refactor components to functional components with hooks; integrate Okta authentication and Google Analytics

- Converted `Favourites`, `Home`, `Navbar`, `Search`, `User`, and `Navigation` components from class-based to functional components using React hooks.
- Implemented `useOktaAuth` for authentication handling in `Navbar`, `Home`, and `User` components.
- Added Google Analytics tracking for page views in `Favourites`, `Home`, `Navbar`, and `User` components.
- Enhanced `Search` component to handle searches for both beers and platform apps.
- Updated Redux state management in `beerReducer` to handle errors and search queries.
- Added tests for `Navbar` and `Search` components to ensure proper rendering and functionality.
- Improved sitemap generation script to include only relevant routes and handle errors gracefully.
- Updated `index.js` to use `createRoot` from React 18 and refactored routing logic for better clarity.

---------

Signed-off-by: Linards <33150232+HolimaX@users.noreply.github.com>
Co-authored-by: circleci-app[bot] <127350680+circleci-app[bot]@users.noreply.github.com>
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