我正在React-Native
尝试使用SQLite Database
的演示应用。但是根据link建议我在项目的主存储库中运行命令npm install --save react-native-sqlite-storage
,但是我在Windows&但同样的命令在Mac上完美无瑕......然后窗户出了什么问题..请帮助我..
D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo>npm install --save react-native-s
qlite-storage
npm WARN install Couldn't install optional dependency: Unsupported
> bufferutil@1.2.1 install D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_m
odules\bufferutil
> node-gyp rebuild
D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\bufferutil>if not de
fined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\no
de-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.
MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe".
If the component is not installed, either 1) install the Microsoft Windows SDK
for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual
Studio 2008. [D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\buf
ferutil\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:270: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_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\bufferu
til
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil Exit status 1
> utf-8-validate@1.2.1 install D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\no
de_modules\utf-8-validate
> node-gyp rebuild
D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\utf-8-validate>if no
t defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bi
n\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (no
de rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe".
If the component is not installed, either 1) install the Microsoft Windows SDK
for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsoft Visual
Studio 2008. [D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\utf
-8-validate\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:270: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_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo\node_modules\utf-8-v
alidate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate Exit status 1
RNSQLiteDemo@0.0.1 D:\ReactNative Study\RNSQLiteDemo\RNSQLiteDemo
└── react-native-sqlite-storage@2.1.1
答案 0 :(得分:0)
Windows上的本地node.js版本是否会出现问题?该软件包中没有任何内容需要进行任何额外的调整,因此我很想说它是Windows上的node.js版本...也许它已损坏了?尝试升级......
似乎它正在尝试重建你的本地node-gyp并且无法在Windows上找到编译器来完成这项工作......但它与sqlite-storage软件包无关......
BTW react-native-sqlite没有Android版本,并且仍处于早期开发阶段... @ Kastriot Dreshaj