2014-02-19 93 views
1

你能指導我解決我遇到的錯誤嗎?npm install node-sqlserver在windows7上失敗

亞特運行這個對我的本地環境npm install node-sqlserver

我在最後得到這個錯誤:

gyp ERR! build error 
gyp ERR! stack Error: `msbuild` 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: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:\\Program Files\\nodejs\\node_modules\\npm\\node_modu 
les\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\Felipe\AppData\Roaming\npm\node_modules\node-sqlserver 
gyp ERR! node -v v0.10.24 
gyp ERR! node-gyp -v v0.12.1 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the node-sqlserver package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls node-sqlserver 
npm ERR! There is likely additional logging output above. 

npm ERR! System Windows_NT 6.2.9200 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod 
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sqlserver" "-g" 
npm ERR! cwd C:\ 
npm ERR! node -v v0.10.24 
npm ERR! npm -v 1.3.21 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\npm-debug.log 
npm ERR! not ok code 0 

更新1

所有先決條件已運行,這是發生在最後一步:

我也試過downlaoding包從這裏:

http://www.microsoft.com/en-us/download/details.aspx?id=29995

+0

你能夠安裝任何其他包嗎?例如,npm install mongodb會給出任何錯誤? – Bula

+0

是的,我安裝了express,karma等。我現在正在運行節點,直到現在爲止 – Dalorzo

+0

我在我的cmd中運行該命令,並且出現錯誤。 (同一個更準確)。我認爲這個錯誤表明它可能是一個包的問題。你是否也確定你已經安裝了所有的先決條件?類路徑中的python?節點GYP?所有這些都在github的回購頁面 – Bula

回答

0

正如我在評論中所說。你確定你有包所需的所有先決條件嗎?

以下先決條件是使用驅動程序之前,需要:

Node.js的 - 如果可能的話使用最新的版本,但它已經在節點0.6.10測試,後來

節點 - GYP - 全球安裝最新版本(NPM安裝-g節點GYP)

蟒蛇2.7.x - 爲節點GYP(確保它是在路徑)

的Visual C++ 2010 - Express版本是可以免費從微軟

SQL服務器本機客戶端11.0 - 可作爲在SQL Server 2012功能包

我把這個從GitHub的頁面中發現的Microsoft SQL Server 2012本機客戶端。