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

account example error on node 0.8.4 #19

Open
ghost opened this issue Jul 29, 2012 · 1 comment
Open

account example error on node 0.8.4 #19

ghost opened this issue Jul 29, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 29, 2012

Trace below. This happens because the domain option is copied to the ApiServer instance. In 0.8.x EventEmitter tries to 'enter' the domain. I changed the name of the domain option to 'domain_compat' and to get it working.

The real fix? Use a sub-object for the EventEmitter instead of inheriting it? Namespace the options? Both inconvenient.

events.js:80
this.domain.enter();
^
TypeError: Object localhost has no method 'enter'
at EventEmitter.emit (events.js:80:19)
at onRequest (.... /node-apiserver/examples/account/node_modules/apiserver/lib/apiserver.js:120:8)
at Server.EventEmitter.emit (events.js:91:17)
at HTTPParser.parser.onIncoming (http.js:1783:12)
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at Socket.socket.ondata (http.js:1680:22)
at TCP.onread (net.js:410:27)

@kilianc
Copy link
Owner

kilianc commented Jul 30, 2012

Renaming could be a way, looking into this.

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

1 participant