繁体   English   中英

React Native项目初始化错误(Windows)

[英]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”的问题得以解决。 我做了什么:

  1. 重新安装了Visual C ++构建工具2015,同时使用此处的链接修复了缺失的部分

  2. 指出环境变量“ PATH”变量中的MSBuild.exe位置。

  3. 使用npm -g install npm@next node.js和node-gyp更新到最新版本

跑 :

npm缓存清理

还要验证python必须在您的路径变量中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM