NVM

在nvm安装路径下找到setting.txt文件,打开,新增如下信息


node_mirror: https://npm.taobao.org/mirrors/node/

npm_mirror: https://npm.taobao.org/mirrors/npm/

vue3  添加vuex  

vue add vuex


npm install axios --save



linux下安装nvm

下载压缩包

https://github.com/nvm-sh/nvm/archive/refs/tags/v0.38.0.tar.gz

wget https://github.com/nvm-sh/nvm/archive/refs/tags/v0.38.0.tar.gz


解压

mkdir -p /root/.nvm

tar -zxvf nvm-0.38.0.tar.gz -C /root/.nvm


修改 ~/.bashrc 添加以下内容

export NVM_DIR="$HOME/.nvm/nvm-0.38.0"

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

# This loads nvm

[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

# This loads nvm bash_completion

# nodejs下载更换淘宝镜像

export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node


source ~/.bashrc