I am currently attempting to get an Sqlite database in a node app hosted on Azure Websites.
I've listed Sqlite3 in my dependencies field of package.json
:
"sqlite3": "^3.0.8"
When I deploy, I see the following during install:
remote: [sqlite3] Success: "D:\home\site\wwwroot\node_modules\sqlite3\lib\binding\node-v11-win32-ia32\node_sqlite3.node" is installed via remote
However, every request returns a 500 error, so I checked out the app log.
When I look at the application log, I see the following error each deploy:
Mon Jun 29 2015 17:13:51 GMT+0000 (Coordinated Universal Time): Unaught exception: Error: Cannot find module 'D:\home\site\wwwroot\node_modules\sqlite3\lib\binding\node-v14-win32-ia32\node_sqlite3.node
If you notice, when running the application it looks for node_modules\sqlite3\lib\binding\node-v14-win32-ia32\node_sqlite3.node
but it installed to node_modules\sqlite3\lib\binding\node-v11-win32-ia32\node_sqlite3.node
. I don't understand enough about servers in general, or even node's environment to figure out how to get it pointed to the right location or the other version installed. It appears as though Azure has one machine building the code and another machine running the code, where they have different specs.