Under windows, upgrade node
cmd Open the command line
npm -g list to check which packages are installed (to prevent other projects from matching the latest version, you can install them back)
node -v to check the current version
where node to check the current installation path (original installation path)
Go to the node official website (download the latest mis long-term stable version suitable for your operating system)
and install it to the original installation path (this way you don’t need to reconfigure the environment variables)
node -v prints the version information and tests whether the installation is successful.
After successfully installing node, I get an error when running npm install: The operation does not have permission.
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\nodejs\node_global'
Find the node installation folder, right-click - Properties - Advanced Settings
and set users access rights to: Full Control