Angular 13 upgrade — Error: Unknown keyword formatMinimum

Trung Vo
3 min readJan 10, 2024

Problem

I recently upgraded my Angular project from version 12 to version 13 for our massive project at Ascenda.

After the upgrade, I ran into an error when I tried to build the project.

Error: Module build failed(from ./node_modules/mini-css-extract-plugin/dist/loader.js):

Error: Unknown keyword formatMinimum
at get (/build/node_modules/ajv-keywords/dist/index.js:25:15)
at ajvKeywords (/build/node_modules/ajv-keywords/dist/index.js:10:13)
at Object.<anonymous> (/build/node_modules/webpack/node_modules/schema-utils/dist/validatejs:65:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/build/node_modules/webpack/node_modules/schema-utils/dist/indexjs:6:5)

As we can see, the error is related to the formatMinimum keyword in the ajv-keywords package.

The interesting problem is that the error only occurs on CI/CD when you delete the node_modules folder and reinstall the dependencies.

Investigation

--

--

Trung Vo

A seasoned front-end engineer with 9 years of passion in creating experience-driven products. I am proficient in Angular, React and TypeScript development.