在安装完vue后,一段时间后发现再次使用出错;感觉可能是使用了代理的原因,但是就算关闭了代理一样不行;最后重启大法解决。
此处记录解决时使用到的命令。
检查版本
            
            
              shell
              
              
            
          
          node -v
cnpm -v
vue --version
vue -V
        安装
            
            
              shell
              
              
            
          
          npm install -g @vue/cli 
cnpm install -g @vue/cli //镜像源下载
npm install -g @vue/cli@3.12.1 //指定版本号 
//指定源下载
npm install -g cnpm --registry=https://registry.npm.taobao.org
        更新vue 也可用于检查registry能否可用
            
            
              shell
              
              
            
          
          npm install -g npm
npm update -g @vue/cli
npm list -g //list出安装的包
        更换 &查看registry
            
            
              shell
              
              
            
          
          npm config get registry
npm config set registry http://registry.npm.taobao.org
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
//恢复源
npm config set registry=https://registry.npmjs.org/
        清楚cache
            
            
              shell
              
              
            
          
          npm cache clean --force
        关闭证书验证
            
            
              shell
              
              
            
          
          npm config set strict-ssl false
        更换registry还不行就《重启大法》
创建项目
            
            
              js
              
              
            
          
          vue create vueProject01
        其他
cd到D盘、查找文件夹文件
            
            
              shell
              
              
            
          
          d: //直接输入一个" d: "
dir //等同于Linux的 ls
        nvm安装
nvm:node版本管理器
https://github.com/coreybutler/nvm-windows/releases
有时候最新版不兼容会需要降版本
例如 error:digital envelope routines::unsupported
            
            
              shell
              
              
            
          
          where node //查找node位置,删除文件夹既卸载
nvm ls available //查找版本
nvm install 10.23.0 //安装指定版本
nvm ls