Running npm install odbc in a Sails application cause errors?

I am trying to install the node-odbc package ( https://github.com/wankdanker/node-odbc ) in a Sails application.

According to the docs, I installed and configured unixobdc on the server, but when I do npm install odbc --save in the application directory, I get the following error:

npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/ usr / bin / nodejs" "/ usr / bin / npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Unable to set waterline criteria properties undefinednpm ERR! npm ERR! If you need help, you can report this error: npm ERR! * LINK {//github.com/npm/npm/issues} npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/ usr / bin / nodejs" "/ usr / bin / npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Unable to set waterline cursor undefinednpm ERR! npm ERR! If you need help, you can report this error: npm ERR! * LINK {//github.com/npm/npm/issues} npm ERR! Linux 3.19.0-58-generic npm ERR! argv "/ usr / bin / nodejs" "/ usr / bin / npm" "install" "odbc" "--save" npm ERR! node v4.4.3 npm ERR! npm v3.8.7

npm ERR! Unable to set waterline error properties undefinednpm ERR! npm ERR! If you need help, you can report this error: npm ERR! * LINK {//github.com/npm/npm/issues}

npm ERR! Please include the following file with any support request: npm ERR! /Var/www/sails.dev/secApp/npm-debug.log

Any ideas on why this is the case or how I can get this package to work in Sails?

+5
source share
1 answer

Try the following:

Delete the node_modules folder in the application directory.

Inside the application directory, run the following command:

 npm install odbc --save; 

I suspect that something went wrong with your installation of NPM applications, so you just update it by adding a new package.

+2
source

All Articles