I also had the exact same error appear in my ci/cd that had been running fine until today.
Solved it by just updating all packages in my repo with npx ncu -u
npx ncu -u
ncu updates all your packages for you, can be a usefult tool, when used carfully:
ncu
https://www.npmjs.com/package/npm-check-updates