npm ERR! code EEXIST npm ERR! path was reported during the installation of vue-cli

When installing vue/cli, the error reported is as follows:
Type npm install –g vue-cli
Insert picture description here
and try again: npm install @vue/cli –g, the result is still not working,
Insert picture description here
then try to clear the cache: npm cache clean –force ( (Clear npm cache) It was
Insert picture description here
found that the reinstallation was still invalid, and the environment variables were not wrong. Finally, it was solved like this:
the node_cache (node ​​cache folder) under the installation node folder and node_global (global installation is installed under the node_global directory) Delete all the contents of each folder and
execute npm install @vue/cli -g again.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43937400/article/details/106481384