Cannot find module 'mongodb'

This time, it is not an ADF topic, sorry ;)
While trying out some samples on MongoDB and Node.JS, I ran in to a very basic error
Error: Cannot find module 'mongodb'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)

The solution has been discussed in this thread
To summarize solution from the above thread, you may want to do the following:
  • npm install mongodb -g
  • cd /path/to/app/folder
  • npm link mongodb


Post a Comment