You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
_Buffer is not defined in Node.js. If the program reaches this statement, an error will be thrown and, if uncaught, will crash the node process.
Minimal Reproduction
In Node.js REPL (tested against v16.13.2):
> _Buffer
Uncaught ReferenceError: _Buffer is not defined
Workaround
For Node.js, alias the Buffer global as _Buffer in your program entrypoint so that it is defined before calling anything in bson-objectid:
global['_Buffer']=Buffer;
Possible Fix
Attempt to use _Buffer, else fall back to using Buffer. Just using normal Buffer global fixes things for Node.js so a global alias is not required.
The text was updated successfully, but these errors were encountered:
This is fixed and released in v2.0.4 of bson-objectid to npm. Until we have access to master branch of this repository we have published our changes in a fork at https://github.com/cabinjs/bson-objectid.
Description
_Buffer is not defined in Node.js. If the program reaches this statement, an error will be thrown and, if uncaught, will crash the node process.
Minimal Reproduction
In Node.js REPL (tested against v16.13.2):
> _Buffer Uncaught ReferenceError: _Buffer is not defined
Workaround
For Node.js, alias the Buffer global as _Buffer in your program entrypoint so that it is defined before calling anything in bson-objectid:
Possible Fix
Attempt to use _Buffer, else fall back to using Buffer. Just using normal Buffer global fixes things for Node.js so a global alias is not required.
The text was updated successfully, but these errors were encountered: