GaetanGiraud / angular-login

Authentification with Angularjs
34 stars 10 forks source link

error after following instructions #1

Open dexrex347 opened 10 years ago

dexrex347 commented 10 years ago

followed your instructions, received an error when executing node app.js. i had no problem with npm install

i am using: node v0.10.17 express 3.3.5 jade 0.35.0

------error-------

/Users/neal/nodejs_prj/angularauth/angular-login/node_modules/express/lib/router/index.js:252 throw new Error(msg); ^ Error: .get() requires callback functions but got a [object Undefined] at /Users/neal/nodejs_prj/angularauth/angular-login/node_modules/express/lib/router/index.js:252:11 at Array.forEach (native) at Router.route (/Users/neal/nodejs_prj/angularauth/angular-login/node_modules/express/lib/router/index.js:248:13) at Router.(anonymous function) as get at Function.app.(anonymous function) as get at Object. (/Users/neal/nodejs_prj/angularauth/angular-login/app.js:74:5) 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)

GaetanGiraud commented 10 years ago

Hi, I think I've got mixed up between different versions (This is an example app I extracted from a larger project), this route 'routes.sessions.current' is not in use in this example: Comment out this in the app.js file ( line 74 ior 75): app.get('/sessions', routes.sessions.current);

And check if it works then.

sayy commented 10 years ago

Hi, The same issue... your solution doesn't work.

sayy commented 10 years ago

Comment out: // app.get('/sessions', routes.sessions.current); // app.get('/api/users', restrict, api.users.findAll); // app.delete('/api/users/:id', restrict, api.users.delete);

zwhitchcox commented 9 years ago

Not sure if this is still being kept up, but I'm having the same issue. I tried @sayy 's solution, but I get an error when going to localhost:3000

Express 500 Error: /Users/zane/angular-login/views/layout.jade:1 > 1| !!! 2| html(ng-app="ExampleApp") 3| head 4| meta(charset='utf8') !!! is deprecated, you must now use doctype

1| !!! 2| html(ng-app="ExampleApp") 3| head 4| meta(charset='utf8') !!! is deprecated, you must now use doctype at Object.Lexer.doctype (/Users/zane/angular-login/node_modules/jade/lib/lexer.js:253:13) at Object.Lexer.next (/Users/zane/angular-login/node_modules/jade/lib/lexer.js:901:15) at Object.Lexer.lookahead (/Users/zane/angular-login/node_modules/jade/lib/lexer.js:113:46) at Parser.lookahead (/Users/zane/angular-login/node_modules/jade/lib/parser.js:102:23) at Parser.peek (/Users/zane/angular-login/node_modules/jade/lib/parser.js:79:17) at Parser.parse (/Users/zane/angular-login/node_modules/jade/lib/parser.js:117:26) at Parser.parse (/Users/zane/angular-login/node_modules/jade/lib/parser.js:131:24) at parse (/Users/zane/angular-login/node_modules/jade/lib/jade.js:95:21) at Object.exports.compile (/Users/zane/angular-login/node_modules/jade/lib/jade.js:161:16) at Object.exports.render (/Users/zane/angular-login/node_modules/jade/lib/jade.js:299:15)

I changed !!! to doctype and it worked though

zwhitchcox commented 9 years ago

I went ahead and committed all the changes. I can see you put a lot of work into this and would hate for people not to be able to use it!