NPM or NODE error and solution

  1. Version related

ERROR: npm v9.6.2 is known not to run on Node.js v12.22.12. You'll need to upgrade to a newer Node.js version in order to use this version of npm. This version of npm supports the following node versions: ^14.17.0 || ^16.13.0 || >=18.0.0. You can find the latest version at https://nodejs.org/.

Solution: Just uninstall node and npm, and reinstall them.