sails-permissions
sails-permissions copied to clipboard
self.use TypeError: undefined is not a function
Hi,
I'm trying to use this module but when the server start I have this error :
/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails-permissions/node_modules/sails-auth/api/services/passport.js:328
self.use(new Strategy(options, self.protocols[protocol]));
^
TypeError: undefined is not a function
at /Users/jaumard/IdeaProjects/TestPassport/node_modules/sails-permissions/node_modules/sails-auth/api/services/passport.js:328:16
at Array.forEach (native)
at Authenticator.passport.loadStrategies (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails-permissions/node_modules/sails-auth/api/services/passport.js:283:27)
at Authenticator.bound [as loadStrategies] (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at Hook.initialize (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails-auth/api/hooks/sails-auth.js:4:31)
at Hook.bound [as initialize] (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at /Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/lib/hooks/index.js:75:14
at /Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/async/lib/async.js:451:17
at /Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/async/lib/async.js:441:17
at _each (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/async/lib/async.js:46:13)
at Immediate.taskComplete (/Users/jaumard/IdeaProjects/TestPassport/node_modules/sails/node_modules/async/lib/async.js:440:13)
at processImmediate [as _immediateCallback] (timers.js:358:17)
When I look the passport.js file there no "use" method like the error said. What am I doing wrong ?