Closed er-dev closed 3 years ago
Any updates on this? I've been lucky to find this issue, banging my head around this error and trying to wrap it with Meteor.bindEnvironment somehow. So far I switched back to using renderToString.
There is new work on a hooks based implementation of withTracker
(built on top of useTracker
) in #262. It has a very simple server implementation. I wonder if that should be wrapped with Meteor.bindEnvironment
by default.
Maybe check that fork out in your local packages directory, add Meteor.bindEnvironment
and see if it solves your issue?
function useTrackerServer(reactiveFn) {
return Meteor.bindEnvironment(reactiveFn)();
}
Using Meteor.bindEnvironment
didn't work here (though it did stop a weird refresh loop). I actually don't think this is a problem with react-meteor-data
because in my package npdev:collections
I bypassed useTracker
completely, and it still gave me that same error when using renderToNodeStream
. There is also this old flow-router
issue, which talks about similar issues. I think this may be something in core.
Another interesting observation is that even though I get an error:
events.js:183
throw er; // Unhandled 'error' event
^
AssertionError [ERR_ASSERTION]: Cannot await without a Fiber
Everything works just fine.
I'm closing this just because it's too old. We can open new issues for items that are still valid.
Most of these items were solved already or replaced by new strategies (like hooks)
I am trying to use React 16's new
renderToNodeStream
functionality. I see that support was added Meteor 1.6.1.The
react-meteor-data
package'swithTracker
wrapper does not supportrenderToNodeStream
becauseSynchronousCursor
requires a Fiber in order to run DB queries likeThings.find().fetch()