sails-permissions
sails-permissions copied to clipboard
Cannot find module sails-auth
The latest version of sails-permissions results in the following error. To get around this, I reverted to version 1.2.1 which seems to works fine at the moment.
Error: Cannot find module 'sails-permissions/api/hooks/sails-auth'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.
I can confirm this problem.
Yes same for me too.
:+1:
That commit hasn't made any difference to the original issue reported.
I've update to the lastest versions and still get the error
Error: Cannot find module 'sails-permissions/api/hooks/sails-auth'
If I manually add the file sails-auth.js that use to contain
module.exports = require('sails-permissions/api/hooks/sails-auth');
I now get the error
error: Malformed hook! (sails-auth)
error: Hooks should be a function with one argument (`sails`)
OK just found the reason. A previous version of sails-permissions must have installed files in api/hooks, and these need to be removed