Update to the latest version of nodejs

If the current nodejs version is an out-of-date version, it may be possible to use a module that does not match the current version.
In this case, you may need to update your nodejs to the latest version, as follows:

1
2
3
node -v //Check node version
npm cache clean -f //Delete cache
npm install -g n //nodejs version-management plug-in

※ Occasionally, while installing the version management plug-in, the version is too low to be installed, in this case, you must reinstall it directly from the website.

1
2
3
n latest //the latest version
n lts //ls version
n stable //stable version

Update nodejs and then update npm.

1
2
npm -v //Check npm version
npm i -g npm //npm update (global path)

Check last nodejs, npm version

1
2
node -v
npm -v

Version Check

Share