簡體   English   中英

node.js:構建msnodesql失敗

[英]node.js: building msnodesql fails

我想從node.js連接到Windows8上的MSSQL,但我無法正常工作:(

如果我運行node-gyp configure build

我得到這個錯誤

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:\Users\mkirchweger\AppData\Roaming\
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:\\Users\\mkirchweger\\AppData\\Roaming\\npm\\node_mod
ules\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd D:\Bibliotheken\node_test\node_modules\msnodesql
gyp ERR! node -v v0.10.18
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok

如果我嘗試在沒有構建的情況下運行node.js應用程序,則會收到消息

Error: Cannot find module '../build/Release/sqlserver.node'

我應該先將node.js模塊“ Node-sqlserver”重命名為“ MSNodeSQL”。

我可以通過轉到https://github.com/WindowsAzure/node-sqlserver/tree/master/src上的 github模塊找到所需的更改

在上面的鏈接中,更改概述在Operation.h下

更改為(第38行):

int result = uv_queue_work(uv_default_loop(), &operation->work, OnBackground, OnForeground);

至:

int result = uv_queue_work(uv_default_loop(), &operation->work, OnBackground, (uv_after_work_cb)OnForeground);

我希望這個答案足夠。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM