expressjs / express-expose

Expose raw js, objects, and functions to the client-side (awesome for sharing utils, settings, current user data etc)
MIT License
299 stars 26 forks source link

property 'prototype' of undefined #18

Closed ghost closed 12 years ago

ghost commented 12 years ago

Cannot read property 'prototype' of undefined at Object. (/**/node_modules/express-expose/lib/express-expose.js:51:11)

var secure_keys, 
    express = require("express"),
expose = require("express-expose"), // When I remove this line my app can start:
app = express.createServer(secure_keys); 

node -v: 6.0.13

and npm:

├── colors@0.6.0-1 ├─┬ express@3.0.0alpha3 │ ├── commander@0.5.2 │ ├─┬ connect@2.2.2 │ │ ├── crc@0.1.0 │ │ ├── formidable@1.0.9 │ │ ├── mime@1.2.4 │ │ └── qs@0.4.2 │ ├── crc@0.2.0 │ ├── debug@0.7.0 │ ├── mime@1.2.5 │ └── mkdirp@0.3.1 ├── express-expose@0.2.2 ├─┬ optimist@0.2.8 │ └── wordwrap@0.0.2 └─┬ vows@0.5.13 └── eyes@0.1.7

isstaif commented 12 years ago

The same problem for me....

isstaif commented 12 years ago

I think it needs to be compatible with the new Express 3.0

isstaif commented 12 years ago

I'm forking the project and it is almost fixed... https://github.com/isstaif/express-expose/commit/17ff66ae0b157775a0449b86eb45976572ea523f