Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with everyauth after 0.3 version update #116

Open
nleush opened this issue Aug 9, 2012 · 8 comments
Open

Error with everyauth after 0.3 version update #116

nleush opened this issue Aug 9, 2012 · 8 comments

Comments

@nleush
Copy link

nleush commented Aug 9, 2012

TypeError: Object # has no method 'User'
at module.exports.findUserById (/node_modules/mongoose-auth/lib/modules/everymodule/everyauth.js:7:10)

Temporary fix available with package.json:

"dependencies": {
"mongoose-auth": "git://github.com/nleush/mongoose-auth.git",
}

@aadamowski
Copy link

Same problem in my case:

Error detected: TypeError: Object #<Object> has no method 'User'
TypeError: Object #<Object> has no method 'User'
    at module.exports.findUserById (/node_modules/mongoose-auth/lib/modules/everymodule/everyauth.js:7:10)
    at Object.fetchUserFromSession [as handle] (/node_modules/mongoose-auth/node_modules/everyauth/index.js:52:13)
    at next (/node_modules/mongoose-auth/node_modules/everyauth/node_modules/connect/lib/http.js:204:15)
    at Object.registerReqGettersAndMethods [as handle] (/node_modules/mongoose-auth/node_modules/everyauth/index.js:28:9)
    at next (/node_modules/mongoose-auth/node_modules/everyauth/node_modules/connect/lib/http.js:204:15)
    at HTTPServer.Server.handle (/node_modules/mongoose-auth/node_modules/everyauth/node_modules/connect/lib/http.js:217:3)
    at Object.Server.use.handle (/node_modules/express/node_modules/connect/lib/http.js:106:14)
    at next (/node_modules/express/node_modules/connect/lib/http.js:204:15)
    at exports.send (/node_modules/express/node_modules/connect/lib/middleware/static.js:150:11)
    at Object.oncomplete (fs.js:297:15)

@stefaneg
Copy link

Same here.

@davisford
Copy link

same here @nleush i tried your package.json hack, and indeed it resolved it temporarily, but it causes an unmet dependency error when i run npm shrinkwrap.

I was able to resolve it by forcing an upgrade to mongoose 3.x all around. I also forked mongoose-auth here: https://github.com/davisford/mongoose-auth and I forced it to mongoose 3.x. In my project, I also depend on mongoose, so I forced that to 3.x and all seems to be working again. Here's the commit on my project -- you can inspect the complete npm-shrinkwrap to see if it helps resolve your deps. davisford/daisycentral@053be0b

@aadamowski
Copy link

In my case the problem's cause was in Everyauth - see Issue 322, where the new Express autodetection functionality is put to blame.

I've submitted pull request 323 to revert this functionality since it seems to be inherently broken to me.

@joscha
Copy link

joscha commented Dec 5, 2012

Is there any recent news on this issue?

@aadamowski
Copy link

In my case, we've migrated to PassportJS since:

  1. everyauth and mongoose-auth seem to not be maintained anymore,
  2. some design decisions in everyauth seriously violate programming best practices - the code is tied too closely with particular versions of Express, see Everyauth issue 322.

@joscha
Copy link

joscha commented Dec 5, 2012

there seems to be some activity 20 days ago: https://github.com/bnoguchi/everyauth/tree/express3.
@bnoguchi is there any news on this?

@aadamowski Is there a comparable persistence module for Passport?

@aadamowski
Copy link

AFAIR we've implemented a custom module analogous to Mongoose-auth. It wasn't exactly rocket science.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants