[SERVER-60350] Can't use Buffer in mongodb 3.6 js script Created: 30/Sep/21 Updated: 18/Oct/21 Resolved: 18/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | norbert NNN | Assignee: | Edwin Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Hi, I write a js script for mongodb 3.6.3 (Ubuntu 18.04) where I want to use js / nodejs "Buffer", but script execution says:
The minimal script where I can reproduce the issue is:
And the command line:
Can anybody help me, what did I wrong, or what am I miss? Thank you |
| Comments |
| Comment by Edwin Zhou [ 18/Oct/21 ] |
|
We appreciate the update and are happy to hear that mongosh was able to resolve your issue! I will now close this ticket. Best, |
| Comment by norbert NNN [ 18/Oct/21 ] |
|
Hi Edwin Zhou,
thank you for the help, after migrating to mongodb 5.0 and execute the script via mongosh the problem gone away. This is a sufficient solution for me. Note: executing the script via mongo command directly still fail on missing Buffer class. |
| Comment by Edwin Zhou [ 15/Oct/21 ] |
|
We still need additional information to diagnose the problem. If this is still an issue for you, would you please let us know if you've found success using the Buffer class in mongosh? Best, |
| Comment by Edwin Zhou [ 01/Oct/21 ] |
|
Thanks for your report. MongoDB 3.6 reached end of life in April 2021 and is no longer supported, but I can provide limit guidance on this issue. The new mongo Shell (mongosh) is a fully functional JavaScript and Node.js 14.x REPL environment for interacting with MongoDB deployments and the Buffer class is also functional when using mongosh. Please let us know if you're running into any issues using the new shell. Best, |