2016-07-07 76 views
0

试图执行react-native init AwesomeProject,但我得到一个令人沮丧的错误:阵营本地项目初始化错误(窗口)

> [email protected] install C:\Users\Yuval\AwesomeProject\node_modules\utf-8-validate 
> node-gyp rebuild 

C:\Users\**myName**\AwesomeProject\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node "" rebuild) 
     Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. 
     C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error 
     MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers 
     ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\**myName**\ 
AwesomeProject\node_modules\utf-8-validate\build\validation.vcxproj] 

我已经安装: 的Visual C++编译工具,2015年 的Node.js - 6.2.2 Python 2.7版 node-gyp 3.3.1

非常感谢您的帮助!

+0

它看起来像你没有Windows SDK版本8.1的系统上安装节点GYP到最新版本。你有没有试过安装它? –

+0

Windows SDK 8.1实际上是安装的,我在注册表中也检查过。 –

+0

Visual Studio认为不然,根据错误 –

回答

1

好的,感谢用户“Ramhound”问题已解决。 我做了什么:

  1. 重新安装VISUAL C++编译工具,而2015年从here

  2. 在环境变量指向了MSBuild.exe位置 “PATH” 变量固定的使用环节缺少的部分。

  3. 更新的Node.js和使用npm -g install [email protected]
0

运行:

NPM缓存清理

也验证了蟒蛇必须在你的路径变量。