首先查看自己是否安装 NPM,如果没有安装 NPM,请查看 下载并安装.NET Core SDK[1]
因受国内的环境影响,导致了很多速度起不来,所以需要安装国内镜像。
配置 NPM 的淘宝镜像源加速打开poweshell或cmd工具,输入以下命令:
npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist npm config set electron_mirror https://npm.taobao.org/mirrors/electron/ npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/然后输入命令
npm get registry得到返回结果为https://registry.npm.taobao.org/ 说明注册成功。
1
windows 下 Yarn 安装与使用如果你还没有安装 Yarn,通过访问https://classic.yarnpkg.com/latest.msi,下载安装包。双击安装后,输入命令
yarn -v返回版本号1.22.4即表示成功。
Yarn 注册淘宝镜像源加速打开poweshell或cmd工具,输入以下命令:
yarn config set registry https://registry.npm.taobao.org -g yarn config set disturl https://npm.taobao.org/dist -g yarn config set electron_mirror https://npm.taobao.org/mirrors/electron/ -g yarn config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/ -g yarn config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/ -g yarn config set chromedriver_cdnurl https://cdn.npm.taobao.org/dist/chromedriver -g yarn config set operadriver_cdnurl https://cdn.npm.taobao.org/dist/operadriver -g yarn config set fse_binary_host_mirror https://npm.taobao.org/mirrors/fsevents -g然后输入命令,查看当前地址源:
yarn config get registry1
表示配置成功,这样可以解决我们的绝大部分网络环境速度慢的问题。
深入浅出 ASP.NET Core 与 Docker 入门课程
参考资料[1]
下载并安装.NET Core SDK: https://www.yoyomooc.com/yoyomooc/howto-download-install-net-core-sdk
---来自腾讯云社区的---角落的白板报
微信扫一扫打赏
支付宝扫一扫打赏