Build error in pipeline : Cannot find module 'ajv/dist/compile/codegen'

I’m assuming you are using a wrong node version running Cumulocity IoT 10.18 - > Angular 14?

According to this Angular you should only use

Node version ^14.15.0 || ^16.10.0

Can you confirm you are using the correct version in your pipeline?