現象
Windows7 の環境で
sails.js のテストを試したとき http://sailsjs.org/#/documentation/concepts/Testing
sails list
もうまくいくのに、
mocha
で
Cannot find module 'sails'
と怒られた
ときの話
当然
npm list -g
で sails がグローバルにインストールされていることは確認済み
解決方法
環境変数 NODE_PATH に node_modules のパスを設定した
以上
参考 http://stackoverflow.com/questions/21047030/nodejs-cannot-find-module