'npm build process getting failed with LIFECYCLE error

npm build process getting failed with below error

Generic type 'CorsOptionsDelegate' requires 2 type argument(s).
[2022-03-16T09:59:09.903Z] npm ERR! code ELIFECYCLE
[2022-03-16T09:59:09.903Z] npm ERR! errno 1


node_modules/@types/component-emitter/index.d.ts:8:25: ',' expected.

Tried doing following things

  1. npm cache clean
  2. rm -rf node_modules
  3. rm package-lock.json
  4. npm install
  5. npm build

Still issue persist and this issue was observed suddenly as 2 days before builds were getting successfully completed.

Difference is observed in created package-lock.json file



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source