2013-08-29 88 views
0

每個人都有美好的一天!在Windows 8上安裝node-sqlite3時出現錯誤

我的操作系統:Windows 8 安裝的軟件:VS2012 Expess同時,Python的2.7.5,Windows8SDK,節點0.10.17,NPM 1.3.8

我得到了錯誤:

C:\Users\sapa\worksapce\node-sqlite3\build\Release\obj\global_intermediate\sqlite-autoconf-3071700\sqlite3.c(606): fatal error C1083: Cannot open include file: 'stdarg.h': No such file or directory [C:\Users\sapa\worksapce\node-sqlite3\build\deps\sqlite3.vcxproj]

當我安裝模塊node-sqlite3在我的操作系統上。 對於安裝我使用的命令npm安裝node-sqlite3並得到此錯誤。之後,我用從源代碼安裝:

我克隆源從GitHub https://github.com/developmentseed/node-sqlite3

然後我用命令節點GYP配置並得到

C:\Users\sapa\worksapce\node-sqlite3>node-gyp configure 
gyp info it worked if it ends with ok 
gyp info using [email protected] 
gyp info using [email protected] | win32 | x64 
gyp http GET http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz 
gyp http 200 http://nodejs.org/dist/v0.10.17/node-v0.10.17.tar.gz 
gyp http GET http://nodejs.org/dist/v0.10.17/node.lib 
gyp http GET http://nodejs.org/dist/v0.10.17/x64/node.lib 
gyp http 200 http://nodejs.org/dist/v0.10.17/node.lib 
gyp http 200 http://nodejs.org/dist/v0.10.17/x64/node.lib 
gyp info spawn python 
gyp info spawn args [ 'C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\nod 
e-gyp\\gyp\\gyp', 
gyp info spawn args 'binding.gyp', 
gyp info spawn args '-f', 
gyp info spawn args 'msvs', 
gyp info spawn args '-G', 
gyp info spawn args 'msvs_version=auto', 
gyp info spawn args '-I', 
gyp info spawn args 'C:\\Users\\sapa\\worksapce\\node-sqlite3\\build\\config.g 
ypi', 
gyp info spawn args '-I', 
gyp info spawn args 'C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\nod 
e-gyp\\addon.gypi', 
gyp info spawn args '-I', 
gyp info spawn args 'C:\\Users\\sapa\\.node-gyp\\0.10.17\\common.gypi', 
gyp info spawn args '-Dlibrary=shared_library', 
gyp info spawn args '-Dvisibility=default', 
gyp info spawn args '-Dnode_root_dir=C:\\Users\\sapa\\.node-gyp\\0.10.17', 
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\sapa\\worksapce\\node-sqlite 
3', 
gyp info spawn args '--depth=.', 
gyp info spawn args '--generator-output', 
gyp info spawn args 'C:\\Users\\sapa\\worksapce\\node-sqlite3\\build', 
gyp info spawn args '-Goutput_dir=.' ] 
gyp info ok 

然後節點GYP建立並得到:

C:\Users\sapa\worksapce\node-sqlite3>node-gyp build 
gyp info it worked if it ends with ok 
gyp info using [email protected] 
gyp info using [email protected] | win32 | x64 
gyp info spawn msbuild 
gyp info spawn args [ 'build/binding.sln', 
gyp info spawn args '/clp:Verbosity=minimal', 
gyp info spawn args '/nologo', 
gyp info spawn args '/p:Configuration=Release;Platform=x64' ] 
Building the projects in this solution one at a time. To enable parallel build, 
please add the "/m" switch. 
    unpack_sqlite_dep 
    sqlite3.c 
C:\Users\sapa\worksapce\node-sqlite3\build\Release\obj\global_intermediate\sqli 
te-autoconf-3071700\sqlite3.c(606): fatal error C1083: Cannot open include file 
: 'stdarg.h': No such file or directory [C:\Users\sapa\worksapce\node-sqlite3\b 
uild\deps\sqlite3.vcxproj] 
gyp ERR! build error 
gyp ERR! stack Error: `msbuild` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Users\sapa\AppData\Roaming\npm\nod 
e_modules\node-gyp\lib\build.js:267:23) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:789: 
12) 
gyp ERR! System Windows_NT 6.2.9200 
gyp ERR! command "node" "C:\\Users\\sapa\\AppData\\Roaming\\npm\\node_modules\\n 
ode-gyp\\bin\\node-gyp.js" "build" 
gyp ERR! cwd C:\Users\sapa\worksapce\node-sqlite3 
gyp ERR! node -v v0.10.17 
gyp ERR! node-gyp -v v0.10.9 
gyp ERR! not ok 

雲你幫我在這個pr oblem?

回答

0

看起來你正在嘗試構建64位安裝(Platform = x64)。 與故宮安裝sqlite3的一個32位節點v0.10.22爲我工作在Windows 7

0

一套這樣的,然後有一個嘗試: npm config set msvs_version 2012 npm config set python c:/python/python.exe

相關問題