cli4创建项目常见问题loglevel error

Posted 柠檬20

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cli4创建项目常见问题loglevel error相关的知识,希望对你有一定的参考价值。

vue创建项目报错:command failed: npm install --loglevel error

当报错了command failed: npm install --loglevel error &&& command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org时,多了后面那句原因在于安装时是否有选择淘宝镜像。
整理了以下几种解决方法:

  1. npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver 完成操作之后重新创建一下项目
  2. npm cache clean --force 清除npm的缓存(当初我是这么解决的 大多数不是这个问题!)
  3. 如果安装时有选择淘宝镜像,且以上两步还是不行 -> 重新安装以下淘宝源 npm install -g cnpm --registry=https://registry.npm.taobao.org

以上是关于cli4创建项目常见问题loglevel error的主要内容,如果未能解决你的问题,请参考以下文章

关于vue项目eslint关闭事项-cli4+

vue cli4.0 搭建项目

vue cli4.0 快速搭建项目详解

Vue 创建脚手架项目报 command failed: npm install –loglevel error

Vue 创建脚手架项目报 command failed: npm install –loglevel error

Mac电脑创建Vue项目时报错 错误内容:Error: command failed: npm install --loglevel error --legacy-peer-deps