Devendra Verma Devendra Verma - 27 days ago 8x
Git Question

Cannot find module sails-swagger

I have installed a package using

npm install --save
. It installed successfully in the node_module folder of my current directory. But when I run the application then it shows error
Can not find module sails-swagger
I am using the sails js framework for node.


I tested it and faced the same problem. Luckily I was able to fix it.

  1. Remove node_modules rm -rf node_modules
  2. Add "sails-swagger": "0.5.1" to package.json
  3. run npm install
  4. Add config/swagger.js as described here
  5. sails lift and visit localhost:1337/swagger/doc