Mmm, seems like there’s an issue with top-level await in browser-policy-content package. Oddly, it doesn’t fall back to Babel automatically.
What happens if you try this config?
"meteor": {
"modernWebArchsOnly": true,
"modernTranspiler": {
"excludePackages": ["browser-policy-content"]
},
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
}
},
This is just a quick test. I’ll check into it, it should support top-level await (TLA) since we keep reify on SWC compilation, and webapp package, which also uses TLA works well with SWC.
Update: I reproduced the issue and confirm the config above solves it.
However, I found the proper fix in SWC’s code transpilation. It will be included in the upcoming 3.3-beta.1. At that time, you could remove the “excludePackages” config.
meteor:release-3.3
← meteor:favor-reify-transpile
opened 06:03PM - 25 Apr 25 UTC
Fixes: https://forums.meteor.com/t/weekly-update-april-16-2025-faster-bundle-tim… es-with-3-3-beta-0/63494/20
This PR ensures the reify output on SWC transpilation is always favored to ensure top-level await works as expected in all scenarios.
Thanks for the report. These are essential for stable delivery.
4 Likes
[UPDATE]
SOLVED : Error when observing the cursor: TypeError: this.documents?.clear is not a function
opened 04:30PM - 14 Mar 25 UTC
confirmed
Project:Minimongo
Project:Mongo Driver
dependencies
<!--
Before reporting a bug, please check for existing or closed issues
first an… d read the instructions for filing a bug report:
https://github.com/meteor/meteor/blob/devel/CONTRIBUTING.md#reporting-a-bug-in-meteor
### This bug report should include:
- [ ] A short, but descriptive title. The title doesn't need "Meteor" in it.
- [ ] The version of Meteor showing the problem.
- [ ] The last version of Meteor where the problem did _not_ occur, if applicable.
- [ ] The operating system you're running Meteor on.
- [ ] The expected behavior.
- [ ] The actual behavior.
- [ ] A **simple** reproduction! (Must include the Github repository and steps to reproduce the issue on it.)
If you don't include a reproduction the issue is probably going to be closed.
### Independent packages
Please ensure your issue is opened in the appropriate repository:
* Feature Requests: https://github.com/meteor/meteor/discussions
* Blaze: https://github.com/meteor/blaze/
* Galaxy Guide: https://github.com/meteor/galaxy-docs/
-->
## Observed Errors:
**version: METEOR@3.1.2**
After I change the subscription, there is a certain probability of errors occurring, and once an error occurs, it will continue to report errors at intervals.
```
Exception while polling query {"collectionName":"name","selector":{"type":"a","ownerId":"123456789"},"options":{"transform":null,"sort":{"accessAt":-1},"limit":200,"projection":{"_id":1,"referenceId":1}}} TypeError: this.documents?.clear is not a function
at FindCursor.rewind (/Users/name/.meteor/packages/npm-mongo/.6.10.2.1sx2v8ti8rif++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/src/cursor/abstract_cursor.ts:660:21)
at AsynchronousCursor._rewind (packages/mongo/asynchronous_cursor.js:120:20)
at AsynchronousCursor.forEach (packages/mongo/asynchronous_cursor.js:99:10)
at AsynchronousCursor.map (packages/mongo/asynchronous_cursor.js:111:16)
at AsynchronousCursor.fetch (packages/mongo/asynchronous_cursor.js:131:17)
at AsynchronousCursor.getRawObjects (packages/mongo/asynchronous_cursor.js:147:19)
at PollingObserveDriver._pollMongo (packages/mongo/polling_observe_driver.ts:153:39)
at Object.task (packages/mongo/polling_observe_driver.ts:111:18)
at AsynchronousQueue._processOrderedBatch (packages/meteor.js:915:41)
at AsynchronousQueue._run (packages/meteor.js:873:18)
at Immediate.<anonymous> (packages/meteor.js:850:14)
at processImmediate (node:internal/timers:491:21)
at process.topLevelDomainCallback (node:domain:161:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
```


Before this error occurred, I had just re-imported the database, and I'm not sure if it's related.
## Impact:
Apart from the continuous error messages, no other impacts have been observed.
## Request for Help:
Any help or pointers would be highly appreciated!
4 Likes
I’ve been using 3.3-beta.0 this weekend. The biggest thing that is annoying me during development is it doesn’t seem to know how to get to the code like the old bundler. Everything is anon
both client and serverside.
"meteor": {
"modernWebArchsOnly": true,
"modernTranspiler": true,
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
},
This also makes using debugger
impossible.
1 Like
Thanks for testing. This time it’s a common use case we haven’t test so much yet, debugging.
I believe the issue is related to how we link the source map data with the file metadata in SWC. I will review this use case, as it likely misses the proper configuration.
3 Likes