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

TypeError: Object #<Object> has no method 'removeListener' #462

Closed
balupton opened this issue Mar 17, 2013 · 5 comments
Closed

TypeError: Object #<Object> has no method 'removeListener' #462

balupton opened this issue Mar 17, 2013 · 5 comments

Comments

@balupton
Copy link
Member

Been getting these errors a lot since v6.25.0 on the balupton and docpad websites. Need to be fixed, but I'm not yet sure what is causing the problem.

info: Generating...
error: An error occured: 
TypeError: Object #<Object> has no method 'removeListener'
    at g (events.js:174:10)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:39:27)
    at Object.<anonymous> (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:46:9)
    at /Users/balupton/Projects/docpad/out/lib/plugin.js:89:26
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.<anonymous> (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:46:9)
    at /Users/balupton/Projects/docpad/out/lib/plugin.js:89:26
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.<anonymous> (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at /Users/balupton/Projects/docpad/out/lib/docpad.js:848:18
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.<anonymous> (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:562:18)
    at _Class.balUtilFlow.Group._Class.serial (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:593:12)
    at _Class.balUtilFlow.Group._Class.sync (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:588:19)
    at DocPad.EventEmitterEnhanced.emitSync (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:52:13)
    at DocPad.generatePostpare (/Users/balupton/Projects/docpad/out/lib/docpad.js:2599:12)
    at DocPad.generatePostpare (/Users/balupton/Projects/docpad/out/lib/docpad.js:734:48)
    at /Users/balupton/Projects/docpad/out/lib/docpad.js:2696:27
    at _Class.balUtil.flow.next (/Users/balupton/Projects/docpad/out/lib/docpad.js:2575:16)
    at _Class.balUtilFlow.Group._Class.exit (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:479:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:438:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at _Class.next (/Users/balupton/Projects/docpad/out/lib/docpad.js:2361:16)
    at _Class.balUtilFlow.Group._Class.exit (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:479:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:438:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at CleanUrlsPlugin.writeAfter (/Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cleanurls/out/cleanurls.plugin.js:110:9)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at /Users/balupton/Projects/docpad/out/lib/plugin.js:89:26
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at Object.<anonymous> (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/events.js:49:30)
    at Object.balUtilFlow.fireWithOptionalCallback (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:32:27)
    at run (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:543:30)
    at _Class.balUtilFlow.Group._Class.runTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:548:11)
    at _Class.balUtilFlow.Group._Class.nextTask (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:517:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:436:18)
    at /Users/balupton/Projects/docpad/node_modules/bal-util/out/lib/flow.js:450:31
    at _Class.next (/Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/out/cachr.plugin.js:133:18)
    at _Class.balUtilFlow.Group._Class.exit (/Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/flow.js:479:14)
    at _Class.balUtilFlow.Group._Class.complete (/Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/flow.js:438:18)
    at /Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/flow.js:450:31
    at /Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/out/cachr.plugin.js:143:22
    at /Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/out/cachr.plugin.js:91:20
    at compare (/Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/paths.js:835:20)
    at /Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/paths.js:851:20
    at /Users/balupton/Projects/balupton.docpad/node_modules/docpad-plugin-cachr/node_modules/bal-util/out/lib/paths.js:102:18
    at Object.oncomplete (fs.js:93:15)
info: Regenerated at 22:22:21
@slindberg
Copy link

If it helps, I only started getting these errors after upgrading to node v0.10.0 (previously on v0.8.18).

@balupton
Copy link
Member Author

Hrmm.... I haven't gotten these errors with 0.10.1, how about you?

@slindberg
Copy link

I upgraded to v0.10.1 this morning and have still seen a couple of these error go past.

@balupton
Copy link
Member Author

Looked into it, the error is definitely thrown in the node code - it points to the removeListener call within the once call. Will look into it to see if the fix is within us, or Node.

balupton referenced this issue in nodejs/node-v0.x-archive Mar 23, 2013
Also cleanup unnecessary use of "self" since it will always be called
using .apply() from emit.
@balupton
Copy link
Member Author

Fixed/worked-around the node.js change in bal-util v1.16.13

Reinstall docpad with the -f flag and you'll be good to go.

balupton added a commit that referenced this issue Mar 23, 2013
- v6.26.2 March 23, 2013
	- Fixes `TypeError: Object #<Object> has no method 'removeListener'`
		- Thanks to [Steven Lindberg](https://github.com/slindberg) for
[issue #462](#462)
	- Can now customise the `watchOptions` that are used to construct the
[watchr](https://github.com/bevry/watchr) instances we create
	- Updated dependencies
balupton added a commit that referenced this issue Oct 23, 2013
- v6.26.2 March 23, 2013
	- Fixes `TypeError: Object #<Object> has no method 'removeListener'`
		- Thanks to [Steven Lindberg](https://github.com/slindberg) for
[issue #462](#462)
	- Can now customise the `watchOptions` that are used to construct the
[watchr](https://github.com/bevry/watchr) instances we create
	- Updated dependencies
balupton added a commit to bevry-archive/bal-util that referenced this issue Jun 10, 2018
- v1.16.13 March 23, 2013
	- `balUtilEvents` changes:
		- `EventEmitterEnhanced` changes:
			- Now works with `once` calls in node 0.10.0
				- Closes
[docpad/docpad#462](docpad/docpad#462)
			- Changed `emitSync` to be an alias to `emitSerial` and `emitAsync`
to be an alias to `emitParallel`
			- Added new `getListenerGroup` function
	- `balUtilFlow` changes:
		- `fireWithOptionalCallback` can now take the method as an array of
`[fireMethod,introspectMethod]`  useful for pesly binds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants