Just to add a new comment here to confirm. I was trying to use --ignore-engines, but it was not working properly.
--ignore-engines
When I globally added, it worked in my case.
Command: yarn config set ignore-engines true
yarn config set ignore-engines true