I'm working on a project that was originally made with sails 0.9.8.something and was recently updated to 0.10.4. I've received errors while trying to run sails lift
since then. Here's the error:
module.js:340
throw err;
^
Error: Cannot find module './Sails'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/mjbrender/Documents/Development/session86/node_modules/sails/lib/app/index.js:6:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
To confirm, I've updated locally:
$ sails -v
0.10.4
And after reading this, I deleted and updated as recommended. Still no luck. Any clue what's up?
You need to install sails locally in your project directory as well. Delete the node_modules/sails
folder and run npm install sails
in the root directory of your application. See if this solves the issue.
A rough migration guide can also be found here