meteor-collection2
meteor-collection2 copied to clipboard
Meteor 3.0 potential bug
As reported in Slack by @StorytellerCZ :
W20240122-18:59:31.199(1)? (STDERR) meteor://💻app/packages/mongo.js:3584
W20240122-18:59:31.200(1)? (STDERR) throw new Error("".concat(m, " + is not available on the server. Please use ").concat(getAsyncMethodName(m), "() instead."));
W20240122-18:59:31.200(1)? (STDERR) ^
W20240122-18:59:31.200(1)? (STDERR)
W20240122-18:59:31.200(1)? (STDERR) Error: update + is not available on the server. Please use updateAsync() instead.
W20240122-18:59:31.200(1)? (STDERR) at Object.ret.<computed> [as update] (packages/mongo/remote_collection_driver.js:52:15)
W20240122-18:59:31.200(1)? (STDERR) at Collection.update (packages/mongo/collection.js:959:31)
W20240122-18:59:31.200(1)? (STDERR) at Collection.Mongo.Collection.<computed> [as update] (packages/aldeed:collection2/main.js:236:23)
W20240122-18:59:31.200(1)? (STDERR) at packages/accounts-oauth/oauth_server.js:94:41
W20240122-18:59:31.200(1)? (STDERR) at AsynchronousCursor.forEach (packages/mongo/mongo_driver.js:1115:22)
W20240122-18:59:31.200(1)? (STDERR) at processTicksAndRejections (node:internal/process/task_queues:95:5)
W20240122-18:59:31.200(1)? (STDERR)
W20240122-18:59:31.200(1)? (STDERR) Node.js v20.9.0
If I add
if (Meteor.isServer && Meteor.isFibersDisabled) {
return null
}
to line 236 in main.js
it goes away. Probably not the best approach though.