I am trying to do a homework for a mongodb uni course. They gave us some files, instructions are:
run npm install mongodb then node app.js<
npm install mongodb
node app.js
If you have a package-lock.json file, you may have to delete that file then run npm i. That worked for me
package-lock.json
npm i