Search code examples
mongodbnpmsails.jswaterlinesails-mongo

npm install sails-mongo --save not working


I wanted to add sails-mongo in my sails project. But when I am trying to install sails-mongo (npm install sails-mongo --save). It's Showing Error :

~/newWebApp $ npm install sails-mongo --save

npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "sails-mongo" "--save"
npm ERR! node v0.10.37
npm ERR! npm  v3.3.3

npm ERR! Cannot set property 'lodash' of undefined
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "sails-mongo" "--save"
npm ERR! node v0.10.37
npm ERR! npm  v3.3.3

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! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "sails-mongo" "--save"
npm ERR! node v0.10.37
npm ERR! npm  v3.3.3

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! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "sails-mongo" "--save"
npm ERR! node v0.10.37
npm ERR! npm  v3.3.3

npm ERR! Cannot set property 'fs-extra' of undefined
npm ERR! 
npm ERR! If you need help, you may report this error at:

npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "sails-mongo" "--save"
npm ERR! node v0.10.37
npm ERR! npm  v3.3.3

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! Please include the following file with any support request:
npm ERR!     /home/vgulp/newWebApp/npm-debug.log

Solution

  • Its due to incompatibility of sails-mongo (or its dependencies)package with latest npm.

    sudo npm install [email protected] -g

    Then running

    npm install sails-mongo --save

    should solve your problem.