Install vue-cli error: WARN config global `--global`, `--local` are deprecated. Use `--location=global`.......

Error picture

insert image description here

reason

Maybe the nodejs version is too high

Solution

To reduce the nodejs version, I chose to 14.13.1
insert image description here
insert image description here
install vue-cli after installing version 14.13.1, and an error was reported:npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

This is mainly because I am using a mac, which generally requires administrator privileges when installing certain software.

So just add it before the command sube, for example:

sudo npm install -g @vue/cli

Successful installation:
insert image description here

Supongo que te gusta

Origin blog.csdn.net/weixin_35773751/article/details/126217726
Recomendado
Clasificación