I had the same issue, and what I did was install the yarn without --frozen-lockfile flag and the yarn-lock file got updated, and then I included this flag in my CI/CD code and it worked.