Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1922

Error loading latest version

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.3
    • Affects Version/s: 3.2.2
    • Component/s: None
    • Labels:

      I get the following error when I use the mongodb driver (version 3.2.2). The error is triggered when the module is imported at the beginning of the file of one of my functions.

       

      { "errorMessage": "Error while loading message", "errorType": "SyntaxError", "stackTrace": [ "/api/.webpack/service/src/api/message/handler.js:67885", "async function* asyncIterator() \{", "^", "", "SyntaxError: Unexpected token *", "at createScript (vm.js:80:10)", "at Object.runInThisContext (vm.js:139:10)", "at Module._compile (module.js:616:28)", "at Object.Module._extensions..js (module.js:663:10)", "at Module.load (module.js:565:32)", "at tryModuleLoad (module.js:505:12)", "at Function.Module._load (module.js:497:3)", "at Module.require (module.js:596:17)", "at require (internal/module.js:11:18)", "at Object.createHandler (/api/node_modules/serverless-offline/src/functionHelper.js:104:21)", "at handler (/api/node_modules/serverless-offline/src/index.js:590:40)", "at Object.internals.handler (/api/node_modules/hapi/lib/handler.js:96:36)", "at request._protect.run (/api/node_modules/hapi/lib/handler.js:30:23)", "at module.exports.internals.Protect.internals.Protect.run (/api/node_modules/hapi/lib/protect.js:64:5)", "at exports.execute (/api/node_modules/hapi/lib/handler.js:24:22)", "at each (/api/node_modules/hapi/lib/request.js:384:16)", "at iterate (/api/node_modules/items/lib/index.js:36:13)", "at done (/api/node_modules/items/lib/index.js:28:25)", "at internals.Auth.payload (/api/node_modules/hapi/lib/auth.js:223:16)", "at each (/api/node_modules/hapi/lib/request.js:384:16)", "at iterate (/api/node_modules/items/lib/index.js:36:13)", "at done (/api/node_modules/items/lib/index.js:28:25)", "at onParsed (/api/node_modules/hapi/lib/route.js:402:20)", "at Subtext.parse (/api/node_modules/hapi/lib/route.js:423:20)", "at next (/api/node_modules/subtext/lib/index.js:45:26)", "at Wreck.read (/api/node_modules/subtext/lib/index.js:242:16)", "at finish (/api/node_modules/subtext/node_modules/wreck/lib/index.js:374:20)", "at wrapped (/api/node_modules/hoek/lib/index.js:879:20)", "at module.exports.internals.Recorder.onReaderFinish (/api/node_modules/subtext/node_modules/wreck/lib/index.js:449:16)", "at Object.onceWrapper (events.js:313:30)", "at emitNone (events.js:111:20)", "at module.exports.internals.Recorder.emit (events.js:208:7)", "at finishMaybe (_stream_writable.js:614:14)", "at endWritable (_stream_writable.js:622:3)", "at module.exports.internals.Recorder.Writable.end (_stream_writable.js:573:5)", "at IncomingMessage.onend (_stream_readable.js:595:10)", "at Object.onceWrapper (events.js:313:30)", "at emitNone (events.js:111:20)", "at IncomingMessage.emit (events.js:208:7)", "at endReadableNT (_stream_readable.js:1064:12)", "at _combinedTickCallback (internal/process/next_tick.js:138:11)" ], }

       

      It's similar to what was reported in https://jira.mongodb.org/browse/NODE-1908?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=2198876#comment-2198876

      In my case I'm deploying my services via the Serverless Framework to AWS. 

       

      It seems to work if I downgrade to a previous version of the driver.

       

      Thanks for your time, 

       

      JA

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            javila83@gmail.com JORGE AVILA
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: