-------react native之前安装
https://github.com/jonymrshi/react-native-webstrom#userconsent#
国内优秀npm镜像
1.临时使用
<code style="font-family: Consolas, Menlo, Monaco, 'Courier New', monospace; font-size: 1em; padding: 0px; color: inherit; background-color: transparent;"><span class="hljs-built_in" style="color: rgb(38, 139, 210);">npm</span> --registry <span class="hljs-attribute" style="color: rgb(181, 137, 0);">https</span>:<span class="hljs-regexp" style="color: rgb(42, 161, 152);">//</span>registry.<span class="hljs-built_in" style="color: rgb(38, 139, 210);">npm</span>.taobao.org install express</code>
2.持久使用
<code style="font-family: Consolas, Menlo, Monaco, 'Courier New', monospace; font-size: 1em; padding: 0px; color: inherit; background-color: transparent;">npm config <span class="hljs-keyword" style="color: rgb(133, 153, 0);">set</span> registry https:<span class="hljs-comment" style="color: rgb(147, 161, 161);">//registry.npm.taobao.org</span> <span class="hljs-comment" style="color: rgb(147, 161, 161);">// 配置后可通过下面方式来验证是否成功</span> npm config <span class="hljs-keyword" style="color: rgb(133, 153, 0);">get</span> registry <span class="hljs-comment" style="color: rgb(147, 161, 161);">// 或</span> npm info express</code>
3.通过cnpm
使用
<code style="font-family: Consolas, Menlo, Monaco, 'Courier New', monospace; font-size: 1em; padding: 0px; color: inherit; background-color: transparent;">npm <span class="hljs-operator"><span class="hljs-keyword" style="color: rgb(133, 153, 0);">install</span> -g cnpm <span class="hljs-comment" style="color: rgb(147, 161, 161);">--registry=https://registry.npm.taobao.org</span>
// 使用
cnpm <span class="hljs-keyword" style="color: rgb(133, 153, 0);">install</span> expresstall express</span></code>