Visual Studio2017 淘宝镜像 Visual Studio 2017使用淘宝镜像的方法
凌雲木 人气:0想了解Visual Studio 2017使用淘宝镜像的方法的相关内容吗,凌雲木在本文为您仔细讲解Visual Studio2017 淘宝镜像的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:Visual,Studio2017,淘宝镜像,vs2017,npm,淘宝镜像,下面大家一起来学习吧。
使用VS2017还原NPM包时,因为要访问外网,安装时间特别漫长,而且等待很长时间也可能安装错误
npm安装
淘宝 NPM 镜像:一个完整 npmjs.org 镜像,你可以用此代替官方版本(只读),同步频率目前为 10分钟 一次以保证尽量与官方服务同步。
安装淘宝镜像
- 1 npm config set registry https://registry.npm.taobao.org
- 2 npm info underscore
- 3 修改VS2017Npm外部配置工具
Npm配置默认选项
需要添加以下路径
C:\Program Files\nodejs
C:\Users\82511\AppData\Roaming\npm
D:\Program Files\Git\bin
配置淘宝镜像
再次还原npm,出现如下的安装信息。
PATH=.\node_modules\.bin;%PATH%;d:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;d:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin;C:\Program Files\nodejs;C:\Users\82511\AppData\Roaming\npm;D:\Program Files\Git\bin "C:\Program Files\nodejs\npm.CMD" install Vue@0.0.0 E:\COLDDEMO\Vue +-- @types/webpack-env@1.13.0 +-- abbrev@1.1.0 +-- acorn@5.0.3 +-- acorn-dynamic-import@2.0.2 | `-- acorn@4.0.13 +-- ajv@5.2.0 +-- ajv-keywords@1.5.1 +-- align-text@0.1.4 +-- alphanum-sort@1.0.2 +-- ansi-html@0.0.7 +-- ansi-regex@2.1.1 +-- ansi-styles@2.2.1 +-- anymatch@1.3.0 +-- argparse@1.0.9 +-- arr-diff@2.0.0 +-- arr-flatten@1.0.3 +-- array-unique@0.2.1 +-- arrify@1.0.1 +-- asn1.js@4.9.1 | `-- memory-fs@0.4.1 +-- webpack-hot-middleware@2.18.0 +-- webpack-node-externals@1.6.0 +-- webpack-sources@1.0.1 | `-- source-list-map@2.0.0 +-- whatwg-fetch@2.0.3 +-- whet.extend@0.9.9 +-- which-module@1.0.0 +-- window-size@0.1.0 +-- wordwrap@0.0.2 +-- wrap-ansi@2.1.0 +-- xtend@4.0.1 +-- y18n@3.2.1 +-- yallist@2.1.2 +-- yargs@6.6.0 | +-- camelcase@3.0.0 | `-- cliui@3.2.0 `-- yargs-parser@4.2.1 `-- camelcase@3.0.0 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Npm还原成功示意图
加载全部内容