Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/routes/AggFramework.js issue with bson require #11

Closed
fullaware opened this issue May 5, 2018 · 3 comments
Closed

/routes/AggFramework.js issue with bson require #11

fullaware opened this issue May 5, 2018 · 3 comments
Assignees

Comments

@fullaware
Copy link
Collaborator

fullaware commented May 5, 2018

internal/modules/cjs/loader.js:550
    throw err;
    ^

Error: Cannot find module 'bson'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/routes/aggframework.js:4:10)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
@fullaware
Copy link
Collaborator Author

Commenting line allows app to proceed
// var BSON=require('bson');

@fullaware
Copy link
Collaborator Author

New error after commenting out BSON

Listening on port 3000
/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:132
      throw err;
      ^

Error: Error creating index: cyclic dependency detected
    at /Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/connect-mongodb-session/index.js:58:21
    at err (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:415:14)
    at session.endSession (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:399:27)
    at ClientSession.endSession (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/node_modules/mongodb-core/lib/sessions.js:72:41)
    at executeCallback (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:397:17)
    at err (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:415:14)
    at executeCallback (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:404:25)
    at handleCallback (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/utils.js:128:55)
    at /Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/lib/db.js:1057:25
    at executeWrite (/Users/bnewell/projects/MongoDB_AGeneralPurposeDB/node_modules/mongodb/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:82:5)

@fullaware
Copy link
Collaborator Author

Issue was on my end. Still have to keep BSON commented out though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants