解决下包速度慢的问题
1. 查看当前包的镜像源 npm config get registry
2. 切换淘宝镜像源:npm config set registry https://registry.npm.taobao.org
2.1 切换为源镜像源 : npm config set registry https://registry.npmjs.org
3. 查看当前包的镜像源 npm config get registry 输出 https://registry.npm.taobao.org/
npm config set proxy null
为了更方便的切换下包的镜像源,我们可以安装 nrm 这个小工具,利用 nrm 提供的终端命令,可以快速查看和切换下 包的镜像源。
1. npm install -g nrm
2.nrm ls 查看所有可用镜像源
3. nrm use taobao
warning: LF will be replaced by CRLF in 解决办法(转载备注)
warning: LF will be replaced by CRLF in
原因是存在符号转义问题
windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示,解决办法:
git config --global core.autocrlf false
————————————————
版权声明:本文为CSDN博主「Am星星」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/csdn799316120/article/details/79565579
目录
warning: LF will be replaced by CRLF in 解决办法(转载备注)
说是淘宝镜像的地址不对啦之类的。
所以你第一反应时npm config set registry https://registry.npmjs.org
但是改完了 再运行安装命令还是报错,咋办? 请执行一下命令 即可安装成功
npm cache clean --force
npm config set proxy null
npm config set https-prox null
npm config set registry http://registry.cnpmjs.org/
npm i @vue/cli -g
安静等待安装结果