首页 > 这是我Windows下执行react-native init Project18的输出,谁给看看什么问题?

这是我Windows下执行react-native init Project18的输出,谁给看看什么问题?

This will walk you through creating a new React Native project in C:\RN\Project18
Installing react-native package from npm...

bufferutil@1.2.1 install C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\bu
fferutil
node-gyp rebuild

C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\bufferutil>if not defined npm
_config_node_gyp (node "C:\Users\xitao\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\
node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
MSBUILD : error MSB3428: δ�ܼ��� Visual C++ ������VCBuild.exe����Ҫ���������⣬1) ��װ .NET Framework 2.
0 SDK��2) ��װ Microsoft Visual Studio 2005���� 3) ��������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���
С� [C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\bufferutil\build\binding
.sln]

utf-8-validate@1.2.1 install C:\RN\Project18\node_modules\react-native\node_modules\ws\node_module

s\utf-8-validate

node-gyp rebuild

C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\utf-8-validate>if not defined
npm_config_node_gyp (node "C:\Users\xitao\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..
\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
MSBUILD : error MSB3428: δ�ܼ��� Visual C++ ������VCBuild.exe����Ҫ���������⣬1) ��װ .NET Framework 2.
0 SDK��2) ��װ Microsoft Visual Studio 2005���� 3) ��������������װ��������λ�ã��뽫��λ�����ӵ�ϵͳ·���
С� [C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\utf-8-validate\build\bin
ding.sln]

spawn-sync@1.0.15 postinstall C:\RN\Project18\node_modules\react-native\node_modules\yeoman-genera

tor\node_modules\cross-spawn\node_modules\spawn-sync

node postinstall

gyp ERR! build error
gyp ERR! stack Error: c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit c
ode: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\xitao\AppData\Roaming\npm\node_modules\npm\node_
modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xitao\\AppData\\Roaming\\npm\\nod
e_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v5.1.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
gyp ERR! build error
gyp ERR! stack Error: c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit c
ode: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\xitao\AppData\Roaming\npm\node_modules\npm\node_
modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xitao\\AppData\\Roaming\\npm\\nod
e_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\RN\Project18\node_modules\react-native\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v5.1.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.2.1
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN optional dep failed, continuing fsevents@1.0.6
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xitao\\AppData\\Roaming\\npm\\node_m
odules\\npm\\bin\\npm-cli.js" "install" "--save" "react-native"
npm ERR! node v5.1.0
npm ERR! npm v2.14.15
npm ERR! path C:\Users\xitao\AppData\Roaming\npm-cache\wrappy\1.0.1\package\package.json.2603065720
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\xitao\AppData\Roaming\npm-cache\wra
ppy\1.0.1\package\package.json.2603065720' -> 'C:\Users\xitao\AppData\Roaming\npm-cache\wrappy\1.0.1
\package\package.json'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename 'C:\Users\xitao\AppData\Roaming\npm-cache
\wrappy\1.0.1\package\package.json.2603065720' -> 'C:\Users\xitao\AppData\Roaming\npm-cache\wrappy\1
.0.1\package\package.json']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\xitao\\AppData\\Roaming\\npm-cache\\wrappy\\1.0.1\\package\\package.jso
n.2603065720',
npm ERR! dest: 'C:\\Users\\xitao\\AppData\\Roaming\\npm-cache\\wrappy\\1.0.1\\package\\package.jso
n',
npm ERR! parent: 'inflight' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! C:\RN\Project18\npm-debug.log

npm install --save react-native failed


需要编译安装。所以,你得有 C++ 的编译器。

【热门文章】
【热门文章】