This seems due to an issue with the Yarn installation or configuration. you trying to use yarn-3.6.4.cjs
try:
npm install --global yarn yarn set version 3.6.4