Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running npm install odbc in Sails app produces errors?

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

As per the docs I have installed and configured unixobdc on the server but when I do npm install odbc --save in the app 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! Cannot set property 'waterline-criteria' of undefined npm ERR! npm ERR! If you need help, you may report this error at: 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! Cannot set property 'waterline-cursor' of undefined npm ERR! npm ERR! If you need help, you may report this error at: 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! Cannot set property 'waterline-errors' of undefined npm ERR! npm ERR! If you need help, you may report this error at: 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 or how I could get this package to work in Sails?

like image 523
Rambling-Monkey Avatar asked Oct 30 '22 04:10

Rambling-Monkey


1 Answers

Try this:

Delete the node_modules folder in your applications directory.

From within your applications directory run this command:

npm install odbc --save;

I suspect that something has gone wrong with your applications NPM installation so you are just refreshing it whilst adding your new package.

like image 184
Craig van Tonder Avatar answered Dec 06 '22 14:12

Craig van Tonder