TypeError: Cannot read property 'protocols' of undefined
Brand new Sails install of version 0.12.0-rc3 Followed instructions then did sails-lift
after the migration prompt ( i chose 3 ) I get this error
error: TypeError: Cannot read property 'protocols' of undefined
at /Users/toddgeist/Desktop/payforthis/node_modules/sails-permissions/node_modules/sails-auth/api/models/User.js:49:30
at bound.module.exports.register (/Users/toddgeist/Desktop/payforthis/node_modules/sails-permissions/node_modules/sails-auth/api/models/User.js:48:12)
at bound [as register] (/usr/local/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
at /Users/toddgeist/Desktop/payforthis/node_modules/sails-permissions/dist/config/fixtures/user.js:27:30
at tryCatcher (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/bluebird/js/main/async.js:15:14)
I did have to install lodash before I could get this far as it referenced in config/permissions.js. This maybe screwing up passport which also needs lodash
this goes away if you install sails-auth@^2.0
That didnt work for me too... I'm on:
{ "name": "server", "private": true, "version": "0.0.0", "description": "a Sails application", "keywords": [], "dependencies": { "bcrypt": "^0.8.5", "express-jwt": "^3.0.1", "grunt-contrib-coffee": "~0.10.1", "include-all": "~0.1.3", "jsonwebtoken": "^5.0.5", "lodash": "^3.10.1", "pluralize": "^1.2.1", "rc": "~0.5.0", "sails": "~0.11.3", "sails-auth": "^2.1.1", "sails-disk": "~0.10.0", "sails-generate-ember-blueprints": "0.0.9", "sails-hook-autoreload": "^0.11.5", "sails-hook-dev": "^1.0.0", "sails-mongo": "^0.11.5", "sails-permissions": "^2.1.11" }, "scripts": { "debug": "node debug app.js", "start": "node app.js" }, "main": "app.js", "repository": { "type": "git", "url": "git://github.com/a/server.git" }, "author": "a", "license": "" }
@dioptre You seem to still be on [email protected], you will need 0.12.0-rc3 for any version above 1.4.5. of sails-permissions to work.
I'm having the same issue.
{ ... "sails": "^0.12.0-rc4", "sails-auth": "^2.1.1", "sails-disk": "~0.10.0", "sails-permissions": "~2.1.11" ... }
sails.services seems empty.
Upgrading sails to 12 rc7 fixed the issue for me. { ... "sails": "^0.12.0-rc7", "sails-auth": "~2.1.1", "sails-permissions": "~2.1.11" ...
}
Update : 'sails lift' works fine, but 'sails console' still has the error
using sails RC7 here, with 2.1.11 for both sails-auth and sails-permissions no aval, the error persist, I tried updating to the latest sails-auth and matching the version with permissions same thing