[英]React Native project init error (windows)
嘗試執行react-native init AwesomeProject
但出現一個令人沮喪的錯誤:
> utf-8-validate@1.2.1 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 ++ Build tools 2015 Node.js-6.2.2 Python 2.7 node-gyp 3.3.1
非常感謝您的幫助!
好的,感謝用戶“ Ramhound”的問題得以解決。 我做了什么:
重新安裝了Visual C ++構建工具2015,同時使用此處的鏈接修復了缺失的部分
指出環境變量“ PATH”變量中的MSBuild.exe位置。
npm -g install npm@next
node.js和node-gyp更新到最新版本 跑 :
npm緩存清理
還要驗證python必須在您的路徑變量中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.