Today I faced this issue and decided to leave a comment—maybe it will help someone.
It turned out I had Node.js version 16 installed, while the project was created with version 20.
I switched my Node.js version to 20, and it worked