-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
https://github.com/mongodb/js-bson#bugs--feature-requests
npm install bson
then:
import
{ BSON, EJSON, ObjectId }from 'bson';
When in node app I am using "bson" library, this is error I get:
node app.js
.../src/node_modules/bson/lib/bson.mjs:95
const nodejsRandomBytes = await (async () => {
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
- is related to
-
NODE-5773 Cant use BSON ObjectId in browser
- Closed