{"id":2680,"date":"2021-04-27T18:00:12","date_gmt":"2021-04-27T09:00:12","guid":{"rendered":"https:\/\/www.oqiita.com\/?p=2680"},"modified":"2022-02-17T06:59:40","modified_gmt":"2022-02-16T21:59:40","slug":"node-gyp-%e3%81%a7%e3%83%93%e3%83%ab%e3%83%89%e9%80%9a%e3%81%99%e3%81%be%e3%81%a7","status":"publish","type":"post","link":"https:\/\/www.oqiita.com\/?p=2680","title":{"rendered":"node-gyp \u3067\u30d3\u30eb\u30c9\u901a\u3059\u307e\u3067"},"content":{"rendered":"<p>node-gyp \u306e\u30d3\u30eb\u30c9\u304c\u901a\u3089\u306a\u304f\u3066\u56f0\u3063\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p><\/p>\n<h3 id=\"i-0\">windows-build-tools<\/h3>\n<p>windows-build-tools \u3053\u3044\u3064\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u3044\u3044\u3063\u3066\u66f8\u3044\u3066\u304b\u3089<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u305f\u304c\u3001\u898b\u4e8b\u306b\u5931\u6557\uff1f<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u9014\u4e2d\u3067\u30cf\u30f3\u30b0\u3057\u3066\u9032\u307e\u306a\u304f\u306a\u308b\u3002<\/p>\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/ja\/thank-you-downloading-visual-studio\/?sku=BuildTools\" rel=\"noopener\" target=\"_blank\">https:\/\/visualstudio.microsoft.com\/ja\/thank-you-downloading-visual-studio\/?sku=BuildTools<\/a><\/p>\n<h3 id=\"i-1\">Python\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/h3>\n<p>3\u7cfb\u30682\u7cfb\u3092\u5165\u308c\u305f\u308a\u6d88\u3057\u305f\u308a\u3057\u305f\uff57<br \/>\n\u3082\u3046\u52d5\u3051\u3070\u3069\u3063\u3061\u3067\u3082\u826f\u304b\u3063\u305f\uff57<\/p>\n<p>\u7d50\u5c403\u7cfb\u3067\u52d5\u3044\u305f<\/p>\n<h3 id=\"i-2\">VS2019Community\u3067C++\u306e\u74b0\u5883\u3092\u5165\u308c\u308b<\/h3>\n<p>\u5143\u304b\u3089VS2019\u306f\u5165\u3063\u3066\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3067\u5165\u308c\u308b\u3002<br \/>\n<a href=\"https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-300x167.png\" alt=\"\" width=\"300\" height=\"167\" class=\"alignnone size-medium wp-image-2682\" srcset=\"https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-300x167.png 300w, https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-1024x570.png 1024w, https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-768x428.png 768w, https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-1536x855.png 1536w, https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-2048x1140.png 2048w, https:\/\/www.oqiita.com\/wp-content\/uploads\/2021\/04\/node-gyp001-940x523.png 940w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><\/p>\n<h3 id=\"i-3\">config\u306e\u8a2d\u5b9a<\/h3>\n<p>\u30fbconfig\u306e\u78ba\u8a8d<br \/>\nnpm config list<\/p>\n<p>\u30fbconfig\u306e\u8a2d\u5b9a<br \/>\nnpm config set python python3.9<br \/>\nnpm config set msvs_version 2019<\/p>\n<h3 id=\"i-4\">\u74b0\u5883\u5909\u6570\u306e\u78ba\u8a8d\u3000VCINSTALLDIR<\/h3>\n<p>\u30de\u30b8\u3067\u30b3\u30a4\u30c4\u304c\u4e00\u756a\u306e\u304f\u305b\u3082\u306e<br \/>\n\u74b0\u5883\u5909\u6570\u306b\u300cVCINSTALLDIR\u300d\u304c\u3044\u3066\u5168\u7136\u9055\u3046\u30d1\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u305f\u3002\u3069\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u8a2d\u5b9a\u3055\u308c\u305f\u304b\u306f\u8b0e\u3002<\/p>\n<p>VS2019Community\u306e\u5834\u5408\u306f\u305f\u3076\u3093\u4ee5\u4e0b\u3002\uff08\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\uff09<br \/>\nC:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC<\/p>\n<p>\u4f7f\u3063\u3066\u308b\u74b0\u5883\u5909\u6570\u3068\u304b\u5168\u90e8\u6559\u3048\u3066\u304f\u308c\u3088\u3049\u3002\u3002\u3002\u3002<\/p>\n<p>\u3042\u3068\u306f\u597d\u304d\u306bnode\u304b\u3089\u3044\u308d\u3044\u308d\u4f7f\u3048\u308b\u306f\u305a\uff01<\/p>\n<p>\u4ee5\u4e0a\u3002<\/p>\n<p>\u3042\u3068\u30a8\u30e9\u30fc\u3067\u3088\u304f\u51fa\u3066\u304d\u305f\u30ef\u30fc\u30c9\u306f\u4ee5\u4e0b\u2193<\/p>\n<pre>\nnode-gyp configure error\n\ndoes not match this Visual Studio Command Prompt\n\nCould not find any Visual Studio installation to use\n\ngyp ERR! find VS **************************************************************\ngyp ERR! find VS You need to install the latest version of Visual Studio\ngyp ERR! find VS including the \"Desktop development with C++\" workload.\ngyp ERR! find VS For more information consult the documentation at:\ngyp ERR! find VS https:\/\/github.com\/nodejs\/node-gyp#on-windows\ngyp ERR! find VS **************************************************************\n<\/pre>\n<p>\u3082\u3046\u3069\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u51fa\u305f\u306e\u304b\u899a\u3048\u3066\u306a\u3044\u3067\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>node-gyp \u306e\u30d3\u30eb\u30c9\u304c\u901a\u3089\u306a\u304f\u3066\u56f0\u3063\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":743,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[9],"tags":[],"class_list":{"0":"post-2680","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-node-js","8":"entry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.oqiita.com\/wp-content\/uploads\/2017\/06\/sango_nodejs_icatch.png","jetpack_shortlink":"https:\/\/wp.me\/p8QluP-He","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/2680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2680"}],"version-history":[{"count":2,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/2680\/revisions"}],"predecessor-version":[{"id":2683,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/2680\/revisions\/2683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/media\/743"}],"wp:attachment":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}