Uninstall node and then install node and nodemon

Uninstall node:

Open the control panel to uninstall node
insert image description here
insert image description here
Find C:\Program Files\nodejs Delete the node.js file

install node

Official download address: http://nodejs.cn/download/
insert image description here
After the download is complete, keep clicking Next (Next).
Step 5: Click the tree icon to select the installation mode you need, and then click Next (Next) )
insert image description here
Click install directly in the next step, no need to check the option in the prompt box (for the following installation of nodemon, do not change the path at the end, the default is Program Files of the c drive)

Check whether the PATH environment variable is configured with Node.js, open the cmd window and enter the command "path", and output the following results:
insert image description here
Check the node.js version: cmd window output node --version

install nodemon

Output in the cmd window: npm i nodemon -g --verbose
If an error is reported, close the cmd window
insert image description here
Reopen the cmd window as an administrator,
and run npm i nodemon -g --verbose again to install nodemon globally.

After the installation is complete, output nodemon -v to check that there is no problem and the installation is complete

Guess you like

Origin blog.csdn.net/weixin_47211345/article/details/110820396