当前位置: 移动技术网 > IT编程>开发语言>.net > Visual Studio 2017使用淘宝镜像的方法

Visual Studio 2017使用淘宝镜像的方法

2018年04月28日  | 移动技术网IT编程  | 我要评论

千亿魔王,五方寒物护异鸟,青青草原的日常

使用vs2017还原npm包时,因为要访问外网,安装时间特别漫长,而且等待很长时间也可能安装错误

npm安装

淘宝 npm 镜像:一个完整 npmjs.org 镜像,你可以用此代替官方版本(只读),同步频率目前为 10分钟 一次以保证尽量与官方服务同步。

安装淘宝镜像

  1. 1 npm config set registry https://registry.npm.taobao.org
  2. 2 npm info underscore
  3. 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还原成功示意图

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网