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:
E QUERY [thread1] ReferenceError: Buffer is not defined :
The minimal script where I can reproduce the issue is:
let buff = new Buffer(10); buff = 1;
And the command line:
mongo localhost:27017/dev minimal.js
Can anybody help me, what did I wrong, or what am I miss?