搜罗了网上一些node连接sqlserver和连接redis的文章,照着试了一天,没有尝试成功。 总是无法找到某个moudle,神人谁给解答一下啊
Node.js - use the latest version if possible, but it has been tested on node 0.6.10 and later
node-gyp - latest version installed globally (npm install -g node-gyp)
python 2.7.x - for node-gyp (make sure it is in the path)
Visual C++ 2010 - the Express edition is freely available from Microsoft
SQL Server Native Client 11.0 - available as Microsoft SQL Server 2012 Native Client found in the SQL Server 2012 Feature Pack
以上一个都不能少。。。╮(╯▽╰)╭
@saighost 的确一个都没少 Native sqlserver module not found. Did you remember to run node-gyp configure build?
D:\Program Files\nodejs\node_modules\msnodesql\lib\sqlserver.native.js:29 throw e; ^ Error: Cannot find module ‘.sqlserver.node’ at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (D:\Program Files\nodejs\node_modules\msnodesql\lib\sqlserver.native.js:25:23) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (D:\Program Files\nodejs\node_modules\msnodesql\lib\sql.js:20:11) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (D:\Program Files\nodejs\node_modules\msnodesql\test\connect.js:20:11) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at D:\Program Files\nodejs\node_modules\msnodesql\node_modules\mocha\lib\mocha.js:152:27 at Array.forEach (native) at Mocha.loadFiles (D:\Program Files\nodejs\node_modules\msnodesql\node_modules\mocha\lib\mocha.js:149:14) at Mocha.run (D:\Program Files\nodejs\node_modules\msnodesql\node_modules\mocha\lib\mocha.js:305:31) at Object.<anonymous> (D:\Program Files\nodejs\node_modules\msnodesql\node_modules\mocha\bin_mocha:327:7) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3 [Finished in 2.2s with exit code 8] [cmd: ['node’, ‘D:\Program Files\nodejs\node_modules\msnodesql\test\runtests.js’]] [dir: D:\Program Files\nodejs\node_modules\msnodesql\test] [path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Windows7Master;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;D:\SVN\bin;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools;C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools\Best Practices Analyzer;D:\Program Files\nodejs;D:\Python27;D:\Android\tools;C:\Users\Administrator\AppData\Roaming\npm;D:\Python27;D:\Program Files\Git\bin]