简体   繁体   中英

React Native project init error (windows)

Trying to execute react-native init AwesomeProject but i get a frustrating error:

> 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]

I have installed: Visual C++ Build tools 2015 Node.js - 6.2.2 Python 2.7 node-gyp 3.3.1

Really appreciate your help!

Ok , thanks to the user "Ramhound" problem is solved. What i did:

  1. Reinstalled visual c++ build tools 2015 while fixing their missing parts using links from here

  2. Pointing out MSBuild.exe location in environment variables "PATH" variable.

  3. Updating node.js and node-gyp to the latest version using npm -g install npm@next

Run :

npm cache clean

also verify python must be in your path variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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