v5.2.9 breaks on Node 4.1 and 5.9 (+more) Buffore.alloc
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
Since 5.2.9 the mongo library (in current range) causes:
Uncaught TypeError: Buffer.alloc is not a function
If the current behavior is a bug, please provide the steps to reproduce.
Here is a test case that shows the error:
for 5.9 https://travis-ci.org/mblarsen/mongoose-hidden/jobs/417260776#L628 for 4.1 https://travis-ci.org/mblarsen/mongoose-hidden/jobs/417260777#L538
Note that just above you’ll see:
current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
I’m not sure that is related.
Please mention your node.js, mongoose and MongoDB version.
"mongoose": "^5.0.0",
No MongoDB depency since my code is a Mongoose library. The error occurs on Travis.
services: mongodb
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
They merged my 2 pull requests with this comment:
We need to wait until
mongodb-core@3.1.3
andmongodb@3.1.4
are released@mblarsen That’s because
Buffer.alloc
was actually added in 5.10 and back port to node.js 4.5. At that time, node.js 4.x was still under active development.