mape / node-express-boilerplate

A boilerplate to quickly get projects going. It gives the developer a clean slate to start with while bundling enough useful features.
MIT License
846 stars 119 forks source link

Cannot read property 'facebook' of undefined #3

Closed Fabryz closed 13 years ago

Fabryz commented 13 years ago

I've just cloned your repo, launched It and got:

16 Aug 20:38:31 - [nodemon] v0.5.3
16 Aug 20:38:31 - [nodemon] watching: /var/www/node-exp-boil
16 Aug 20:38:31 - [nodemon] running server.js
16 Aug 20:38:31 - [nodemon] starting node
16 Aug 20:38:31 - [nodemon] detected old style .nodemonignore
   info  - socket.io started
Caught exception: TypeError: Cannot read property 'facebook' of undefined
TypeError: Cannot read property 'facebook' of undefined
    at Server (/var/www/node-exp-boil/lib/authentication.js:14:23)
    at Object.<anonymous> (/var/www/node-exp-boil/server.js:33:59)
    at Module._compile (module.js:407:26)
    at Object..js (module.js:413:10)
    at Module.load (module.js:339:31)
    at Function._load (module.js:298:12)
    at Array.<anonymous> (module.js:426:10)
    at EventEmitter._tickCallback (node.js:126:26)
mape commented 13 years ago

Have you configured your site config with info from facebook?

Fabryz commented 13 years ago

I don't need any authentication, so I left siteConfig.js all commented as it was by default.

mape commented 13 years ago

Let me know if the latest update fixes it for you.

Fabryz commented 13 years ago

It's working now, no more facebook error.

Actually after some seconds I connect to the app I now get this:

Caught exception: TypeError: Cannot read property 'headers' of undefined
TypeError: Cannot read property 'headers' of undefined
    at Request.callback (/var/www/express-boilerplate/node_modules/connect-assetmanager/lib/assetmanager.js:263:37)
    at Request.<anonymous> (/var/www/express-boilerplate/node_modules/connect-assetmanager/node_modules/request/main.js:154:67)
    at Request.emit (events.js:64:17)
    at ClientRequest.<anonymous> (/var/www/express-boilerplate/node_modules/connect-assetmanager/node_modules/request/main.js:151:13)
    at ClientRequest.emit (events.js:64:17)
    at Socket.<anonymous> (http.js:1214:11)
      at Socket.emit (events.js:64:17)
    at Array.<anonymous> (net.js:830:27)
    at EventEmitter._tickCallback (node.js:126:26)

Do I create another issue here?

mape commented 13 years ago

That seems to be an error with the connect-assetmanager that I'm also the author of. If you create an issue at https://github.com/mape/connect-assetmanager with the config you are using for the connect manager I'll take a look at it.