{"id":2134,"date":"2017-10-12T14:56:39","date_gmt":"2017-10-12T06:56:39","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2134"},"modified":"2017-10-12T14:56:39","modified_gmt":"2017-10-12T06:56:39","slug":"%e5%ae%89%e8%a3%85%e6%b7%98%e5%ae%9d%e7%9a%84cnpm%e7%bb%99npm%e6%8f%90%e9%80%9f","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2134","title":{"rendered":"\u5b89\u88c5\u6dd8\u5b9d\u7684cnpm\u7ed9npm\u63d0\u901f"},"content":{"rendered":"<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=npm\" name=\"npm\" target=\"_blank\" title=\"npm\">npm<\/a>\u670d\u52a1\u5668\u5728\u56fd\u5916\uff0c\u5728\u56fd\u5185\uff0c\u5f88\u591a\u65f6\u5019\u8bbf\u95ee\u5b83\u975e\u5e38\u7684\u6162\uff0c\u751a\u81f3\u4f1a\u51fa\u73b0\u65e0\u6cd5\u8bbf\u95ee\u7684\u60c5\u51b5\u3002\u6709\u4e9b\u63d2\u4ef6\u4e0b\u8f7d\u5931\u8d25\uff0c\u65e0\u6cd5\u66f4\u65b0\uff0c\u975e\u5e38\u5f71\u54cd\u5de5\u4f5c\u6548\u7387\u3002\u56e0\u6b64\u6211\u4eec\u5f88\u6709\u5fc5\u8981\u60f3\u529e\u6cd5\u52a0\u901f\u5b83\uff0c\u8ba9\u5b83\u66f4\u5feb\u7684\u4e3a\u6211\u4eec\u670d\u52a1\u3002\u90a3\u4e48cnpm\u5c31\u5e94\u7528\u800c\u751f\u4e86\uff0c\u672c\u6587\u5c06\u4ecb\u7ecd cnpm \u7684\u5b89\u88c5\u548c\u4f7f\u7528\u3002\n<\/p>\n<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=npm\" name=\"npm\" target=\"_blank\" title=\"npm\">npm<\/a>\uff08node package manager\uff09\u662fnodejs\u7684\u5305\u7ba1\u7406\u5668\uff0c\u7528\u4e8enode\u63d2\u4ef6\u7ba1\u7406\uff08\u5305\u62ec\u5b89\u88c5\u3001\u5378\u8f7d\u3001\u7ba1\u7406\u4f9d\u8d56\u7b49\uff09\u3002\n<\/p>\n<p>\n\t\u4f7f\u7528<a href=\"https:\/\/www.xttblog.com\/?tag=npm\" name=\"npm\" target=\"_blank\" title=\"npm\">npm<\/a>\u5b89\u88c5\u63d2\u4ef6\uff1a\u547d\u4ee4\u63d0\u793a\u7b26\u6267\u884cnpm install &lt;name&gt; [-g] [&#8211;save-dev]\u3002\n<\/p>\n<p>\n\t<a href=\"https:\/\/www.xttblog.com\/?tag=npm\" name=\"npm\" target=\"_blank\" title=\"npm\">npm<\/a>\u5b89\u88c5\u63d2\u4ef6\u662f\u4ece\u56fd\u5916\u670d\u52a1\u5668\u4e0b\u8f7d\uff0c\u53d7\u7f51\u7edc\u5f71\u54cd\u5927\uff0c\u53ef\u80fd\u51fa\u73b0\u5f02\u5e38\uff0c\u5982\u679cnpm\u7684\u670d\u52a1\u5668\u5728\u4e2d\u56fd\u5c31\u597d\u4e86\uff0c\u6240\u4ee5\u6211\u4eec\u4e50\u4e8e\u5206\u4eab\u7684\u6dd8\u5b9d\u56e2\u961f\u5e72\u4e86\u8fd9\u4e8b\u3002\n<\/p>\n<p>\n\t\u6dd8\u5b9d\u5b98\u7f51\u8fd9\u6837\u4ecb\u7ecd\u5b83\uff1a&ldquo;\u8fd9\u662f\u4e00\u4e2a\u5b8c\u6574 npmjs.org \u955c\u50cf\uff0c\u4f60\u53ef\u4ee5\u7528\u6b64\u4ee3\u66ff\u5b98\u65b9\u7248\u672c(\u53ea\u8bfb)\uff0c\u540c\u6b65\u9891\u7387\u76ee\u524d\u4e3a 10\u5206\u949f \u4e00\u6b21\u4ee5\u4fdd\u8bc1\u5c3d\u91cf\u4e0e\u5b98\u65b9\u670d\u52a1\u540c\u6b65\u3002&rdquo;\n<\/p>\n<p>\n\t\u5b98\u65b9\u7f51\u5740\uff1ahttp:\/\/npm.taobao.org\n<\/p>\n<h2>\n\t\u5b89\u88c5<br \/>\n<\/h2>\n<p>\n\t\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u6267\u884c\uff1a\n<\/p>\n<pre class=\"brush:bash;\">\r\nnpm install cnpm -g --registry=https:\/\/registry.npm.taobao.org<\/pre>\n<p>\n\t\u5b89\u88c5\u5b8c\u540e\u6700\u597d\u67e5\u770b\u5176\u7248\u672c\u53f7cnpm -v\u6216\u5173\u95ed\u547d\u4ee4\u63d0\u793a\u7b26\u91cd\u65b0\u6253\u5f00\uff0c\u5b89\u88c5\u5b8c\u76f4\u63a5\u4f7f\u7528\u6709\u53ef\u80fd\u4f1a\u51fa\u73b0\u9519\u8bef\u3002\n<\/p>\n<p>\n\tcnpm\u8ddf<a href=\"https:\/\/www.xttblog.com\/?tag=npm\" name=\"npm\" target=\"_blank\" title=\"npm\">npm<\/a>\u7528\u6cd5\u5b8c\u5168\u4e00\u81f4\uff0c\u53ea\u662f\u5728\u6267\u884c\u547d\u4ee4\u65f6\u5c06npm\u6539\u4e3acnpm\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2134\">\u5b89\u88c5\u6dd8\u5b9d\u7684cnpm\u7ed9npm\u63d0\u901f<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>npm\u670d\u52a1\u5668\u5728\u56fd\u5916\uff0c\u5728\u56fd\u5185\uff0c\u5f88\u591a\u65f6\u5019\u8bbf\u95ee\u5b83\u975e\u5e38\u7684\u6162\uff0c\u751a\u81f3\u4f1a\u51fa\u73b0\u65e0\u6cd5\u8bbf\u95ee\u7684\u60c5\u51b5\u3002\u6709\u4e9b\u63d2\u4ef6\u4e0b\u8f7d\u5931\u8d25\uff0c\u65e0\u6cd5\u66f4\u65b0\uff0c\u975e\u5e38 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1514,1433],"class_list":["post-2134","post","type-post","status-publish","format-standard","hentry","category-html5","tag-cnpm","tag-npm"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2134"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2134\/revisions"}],"predecessor-version":[{"id":2135,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2134\/revisions\/2135"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}