Meteor 3.2
After installing an npm package with Mongo dependencies, Meteor fails with this error:
welkin@Mac issue-top-level-await2 % meteor
[[[[[ ~/code/issue-top-level-await2 ]]]]]
=> Started proxy.
=> Started HMR server.
=> Errors prevented startup:
While building for web.browser:
node_modules/bson/lib/bson.mjs:239:28: Unexpected reserved word 'await'. (239:28)
=> Your application has errors. Waiting for file change.
=> Started MongoDB.
This is a minimal reproducible example.
https://github.com/welkinwong/issue-top-level-await
PS: After resetting everything, the error still persists, so it's unlikely to be cache-related.
meteor reset && rm -rf package-lock.json && rm -rf node_modules && meteor npm i && meteor
The error only occurs when a Meteor package in my /packages directory imports and uses Mongo. This makes me suspect a potential conflict between the two Mongo.
in /packages/abc/
import mongo from 'mongodb';
mongo;
install npm meteor npm i sharedb-mongo
This npm package has a Mongo dependency.
Apologies if my explanation isn't perfect - I'm doing my best to explain this tricky issue. Really appreciate any help!
Meteor 3.2
After installing an npm package with Mongo dependencies, Meteor fails with this error:
This is a minimal reproducible example.
https://github.com/welkinwong/issue-top-level-await
PS: After resetting everything, the error still persists, so it's unlikely to be cache-related.
The error only occurs when a Meteor package in my /packages directory imports and uses Mongo. This makes me suspect a potential conflict between the two Mongo.
in
/packages/abc/install npm
meteor npm i sharedb-mongoThis npm package has a Mongo dependency.
Apologies if my explanation isn't perfect - I'm doing my best to explain this tricky issue. Really appreciate any help!