2016-07-07 77 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緩存清理

也驗證了蟒蛇必須在你的路徑變量。