-
Notifications
You must be signed in to change notification settings - Fork 18
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
TypeError: Can't add property _eventsCount, object is not extensible #21
Comments
Thanks @ramukima your change looks great. Can you create a PR? I think I'm on a much older version of node.js which did not require this property. I recently introduced Object.preventExtensions to the Model so it may potentially break other emitter behavior if there are other private properties that it dynamically creates based on different function calls. Thanks for your help! |
I do not have permission to push to a branch on this repository.
|
I've sent you an invite with write permissions to this repo. Thanks! |
Got it, pushed and created a PR. Please merge. |
Thanks, works. |
I was trying to run yang-cord project and saw this error when starting the server -
events.js:221
target._eventsCount = 0;
^
TypeError: Can't add property _eventsCount, object is not extensible
at _addListener (events.js:221:25)
at Model.addListener (events.js:270:10)
at EventEmitter. (*....../yang-cord/lib/api/server.js:14:17)
I patched it like below to make it work locally -
https://github.com/corenova/yang-js/blob/master/src/yang.coffee#L29
The text was updated successfully, but these errors were encountered: