scottwrobinson / camo

A class-based ES6 ODM for Mongo-like databases.
556 stars 80 forks source link

optional modules not optional #111

Open dkebler opened 6 years ago

dkebler commented 6 years ago

if I install camo with --no-optional. I get this error even though

Error: Cannot find module 'mongodb'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/media/david/dataxfer/lighting/backend/node_modules/camo/lib/clients/mongoclient.js:6:19)

I am not using mongodb and have only in my code

var Document = require('camo').Document;

stevefranchak commented 6 years ago

I submitted PR #116 to fix this issue.

In the meantime, if you need this change, you can install my fork in your node project with: npm install --no-optional https://github.com/stevefranchak/camo/tarball/master