简体   繁体   中英

node.js + azure sql database

i'm struggling with the microsoft's node.js sql client.

I've installed it, without any errors using the guide at the github page, and everything works perfect locally. but when i use git to push it to azure, i get the error:

Native sqlserver module not found. Did you remember to run node-gyp configure build?
Application has thrown an uncaught exception and is terminated:
Error: Unable to load shared library C:\DWASFiles\Sites\bid110\VirtualDirectory0\site\wwwroot\node_modules\msnodesql\build\Release\sqlserver.node

I've also looked at this guide, even though some parts is outdated. I've also cheked that all the files are uploaded to the server. the node_modules/msnodesql and node_modules\\msnodesql\\build\\Release\\ folders with all its subfolders are there as well.

Any ideas what I might be doing wrong here?

Please check if your msnodesql is x86 or x64. If your local machine was x64 with x64 Python, and you installed msnodesql through npm install msnodesql then you should get a x64 version. But on Windows Azure Web Site your application will be running in x86, so you might need to a x86 version of msnodesql. You can install through NPM from a x86 machine, or you can download the compiled version at http://www.microsoft.com/en-us/download/details.aspx?id=29995

I also have a blog post about this hope that helps. http://blogs.shaunxu.me/archive/2012/09/18/node.js-adventure---when-node.js-meets-windows-azure.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM