I encountered this error in a year-long project, and the solution was to reinstall and run it with different Node.js versions. For my project, Node.js version 18.18.2 turned out to be the ideal choice, If you encounter errors with newer Node.js releases, it usually means certain dependencies or packages in your project aren’t yet compatible with the latest version.
Try to use NVM (Node Version Manager). It lets you easily install, manage, and switch between multiple Node.js versions on the same machine, making it perfect for handling projects with different requirements.