﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>学习日记 &#187; nodejs</title>
	<atom:link href="https://www.softwareace.cn/?cat=116&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://www.softwareace.cn</link>
	<description>时刻想着为自己的产品多做一些对他好的事情</description>
	<lastBuildDate>Fri, 20 Mar 2026 06:58:28 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>node-gyp build error windows x64</title>
		<link>https://www.softwareace.cn/?p=1736</link>
		<comments>https://www.softwareace.cn/?p=1736#comments</comments>
		<pubDate>Tue, 27 Feb 2018 04:41:40 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[nodejs]]></category>
		<category><![CDATA[开发经验]]></category>

		<guid isPermaLink="false">http://www.softwareace.cn/?p=1736</guid>
		<description><![CDATA[If all above did not work (my case - Windows10 64bit) D [&#8230;]]]></description>
				<content:encoded><![CDATA[<table style="color: #242729;">
<tbody style="font-weight: inherit; font-style: inherit;">
<tr style="font-weight: inherit; font-style: inherit;">
<td class="answercell" style="font-weight: inherit; font-style: inherit;">
<div class="post-text" style="font-weight: inherit; font-style: inherit;">
<p style="font-weight: inherit; font-style: inherit;">If all above did not work (my case - <strong style="font-style: inherit;">Windows10 64bit</strong>)</p>
<p style="font-weight: inherit; font-style: inherit;">Delete <strong style="font-style: inherit;">C:\Users\user_name\.node-gyp</strong></p>
<p style="font-weight: inherit; font-style: inherit;">Delete <strong style="font-style: inherit;">%AppData%/npm</strong></p>
<p style="font-weight: inherit; font-style: inherit;">Delete <strong style="font-style: inherit;">%AppData%/npm-cache</strong></p>
<p style="font-weight: inherit; font-style: inherit;">And install <strong style="font-style: inherit;">node-gyp</strong> again</p>
<p style="font-weight: inherit; font-style: inherit;">Following instruction on <a style="font-weight: inherit; font-style: inherit; color: #005999;" href="https://github.com/nodejs/node-gyp" rel="noreferrer">node-gyp page</a></p>
<p style="font-weight: inherit; font-style: inherit;">I chose Option 1 <strong style="font-style: inherit;">npm install &#8211;global &#8211;production windows-build-tools</strong></p>
</div>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p style="color: #242729;"><code style="font-weight: inherit; font-style: inherit;">npm config set msvs_version 2013 --global</code> worked for me as I use VS node tools and you dont need to specify msvs_version each time you do an npm install.</p>
<p style="color: #242729;">I had an issue whereby npm&#8217;s config (c:\Users\username\ .npmrc) has an entry msvs_version=2012 which was out of date.</p>
<p style="color: #242729;">
<p>I came across this problem myself, and this is how I solved it using Visual Studio 2010:</p>
<p>Install following packages</p>
<ul>
<li style="font-weight: inherit; font-style: inherit;">Python 2.7+</li>
<li style="font-weight: inherit; font-style: inherit;"><a style="font-weight: inherit; font-style: inherit; color: #005999;" href="http://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso" rel="nofollow noreferrer">Visual C++ Studio 2010 Express</a></li>
<li style="font-weight: inherit; font-style: inherit;"><a style="font-weight: inherit; font-style: inherit; color: #005999;" href="http://www.microsoft.com/en-us/download/details.aspx?id=8279" rel="nofollow noreferrer">Windows SDK 7.1</a> Note: If you get error on installation, maybe this <a style="font-weight: inherit; font-style: inherit; color: #005999;" href="https://stackoverflow.com/questions/1901279/windows-7-sdk-installation-failure">link</a> will help you.</li>
<li style="font-weight: inherit; font-style: inherit;"><a style="font-weight: inherit; font-style: inherit; color: #005999;" href="http://www.microsoft.com/en-us/download/details.aspx?id=23691" rel="nofollow noreferrer">Visual Studio 2010 SP1</a></li>
<li style="font-weight: inherit; font-style: inherit;"><a style="font-weight: inherit; font-style: inherit; color: #005999;" href="http://www.microsoft.com/en-us/download/details.aspx?id=4422" rel="nofollow noreferrer">Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1</a></li>
</ul>
<p>Use <code style="font-weight: inherit; font-style: inherit;">npm install</code> from the Windows SDK command prompt (you need this because it sets additional environment variables).</p>
<p>Source: <a style="font-weight: inherit; font-style: inherit; color: #005999;" href="https://github.com/nodejs/node-gyp/wiki/Visual-Studio-2010-Setup" rel="nofollow noreferrer">node-gyp instructions for VS2010</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.softwareace.cn/?feed=rss2&#038;p=1736</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
