/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If the execution error is reported here ：
Failed to connect to raw.githubusercontent.com port 443: Connection refused
as a result of https://raw.githubusercontent.com This domain name is harmonious in China , But we can do it through reality ip To visit .
sudo vim /etc/hosts
If you still report an error ：
remote: Enumerating objects: 49, done. remote: Counting objects: 100% (49/49), done. remote: Compressing objects: 100% (49/49), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Failed during: git fetch origin --force
We can start with ping once github.com Let's see if it works , If not, the same treatment as above , It's just this time github.com Real domain name of .
If it still doesn't work , Don't try that hard , Just skip this step , Use the following manual installation .
Two ways to choose
brew install nodejs
sudo chmod -R 777 /usr/local/lib/node_modules/
npm -v node -v
npm i -g vue
npm install -g vue-cli
npm install -g webpack
vue init webpack myvue
vue There are many development tools , The contrast is not here , Here we use vscode For example .
establish vue The first program hello word！