{"id":736,"date":"2016-02-27T14:38:32","date_gmt":"2016-02-27T05:38:32","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=736"},"modified":"2017-02-13T14:23:15","modified_gmt":"2017-02-13T05:23:15","slug":"npm%e3%81%ae%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e4%bd%bf%e3%81%84%e3%81%8b%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/736","title":{"rendered":"npm\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u304b\u305f"},"content":{"rendered":"<h2>npm\u3068\u306f<\/h2>\n<dl>\n<dt>npm<\/dt>\n<dd>node.js\u3067\u69cb\u7bc9\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3<\/dd>\n<\/dl>\n<p>&nbsp;<\/p>\n<h2>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u521d\u671f\u5316<\/h2>\n<p>npm\u3067\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u304a\u3044\u305fpackage.json\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7ba1\u7406\u3092\u3059\u308b\u305f\u3081\u300c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u521d\u671f\u5316\u300d\u3068\u300cpackage.json\u306e\u4f5c\u6210\u300d\u306f\u540c\u7fa9\u3002<\/p>\n<h3>\u5bfe\u8a71\u5f0f\u30b3\u30de\u30f3\u30c9\u306b\u3088\u308b\u306apackage.json\u306e\u4f5c\u6210<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm init<\/pre>\n<p>npm\u3067\u7ba1\u7406\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u60c5\u5831\u306fpackage.json\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3002<br \/>\npackage.json\u306f\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u7de8\u96c6\u53ef\u80fd\u3067\u3042\u308b\u304c\u3001\u521d\u56de\u306f\u5bfe\u8a71\u5f0f\u30b3\u30de\u30f3\u30c9\u3067\u4f5c\u6210\u3059\u308b\u306e\u304c\u7c21\u4fbf\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<h3>\u57fa\u672c\u7684\u306a\u69cb\u6587<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm install &lt;module name&gt;<\/pre>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h3>package.json<\/h3>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\u6307\u5b9a\u3057\u306a\u3044\u3068\u304d\u306f\u3001\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e<code>package.json<\/code>\u306b\u8a18\u8ff0\u3057\u305f\u4f9d\u5b58\u95a2\u4fc2\u306b\u3057\u305f\u304c\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>package.json\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u60c5\u5831\u3092\u66f8\u304d\u51fa\u3059<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm install --save-dev &lt;module name&gt;<\/pre>\n<p>package.json\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u60c5\u5831\u304c\u8a18\u8f09\u3055\u308c\u308b\u3068\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u3092\u6307\u5b9a\u3057\u306a\u304f\u3066\u3082 <code>npm install<\/code> \u3060\u3051\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm install &lt;module name&gt;@&lt;version&gt;<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30ed\u30fc\u30ab\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30b0\u30ed\u30fc\u30d0\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<dl>\n<dt>\u30ed\u30fc\u30ab\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/dt>\n<dd>\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f9d\u5b58\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u540c\u4e00\u30de\u30b7\u30f3\u5185\u3067\u3082\u5225\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u306f\u53c2\u7167\u3067\u304d\u306a\u3044\u3002\u30ed\u30fc\u30ab\u30eb\u76f4\u4e0b\u306enode_modules\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/dd>\n<\/dl>\n<dl>\n<dt>\u30b0\u30ed\u30fc\u30d0\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/dt>\n<dd>\u30de\u30b7\u30f3\u5168\u4f53\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3002 <code>-g<\/code>\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u3064\u3051\u308b\u3002<\/dd>\n<\/dl>\n<p>&nbsp;<\/p>\n<h3>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30ed\u30fc\u30ab\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e00\u89a7\u8868\u793a<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm ls<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30b0\u30ed\u30fc\u30d0\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4e00\u89a7\u8868\u793a<\/h3>\n<pre class=\"lang:sh decode:true \" >$ npm ls -g<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u53e4\u3044\u30b0\u30ed\u30fc\u30d0\u30eb\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u78ba\u8a8d<\/h3>\n<pre class=\"lang:sh decode:true \" >npm outdated -g\r\nPackage            Current  Wanted  Latest  Location\r\nelectron-prebuilt    1.4.0   1.4.1   1.4.1\r\ntypescript          1.8.10   2.0.3   2.0.3<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30b0\u30ed\u30fc\u30d0\u30eb\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8<\/h3>\n<pre class=\"lang:sh decode:true \" >npm update -g<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>npm\u3068\u306f npm node.js\u3067\u69cb\u7bc9\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3 &nbsp; \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u521d\u671f\u5316 npm\u3067\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u304a\u3044\u305fpackage.json\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7ba1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[25,23],"class_list":["post-736","post","type-post","status-publish","format-standard","hentry","category-memo","tag-node-js","tag-npm"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=736"}],"version-history":[{"count":14,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/736\/revisions"}],"predecessor-version":[{"id":1216,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/736\/revisions\/1216"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}