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

GridFS stream different BSON module resolving on browser and server dev processes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.5.2, 3.5.4
    • Fix Version/s: None
    • Component/s: BSON, core
    • Labels:
      None
    • Environment:
      mongodb: 3.5.4
      nextron: 5.14.4
      react: 16.12.0
      webpack: 4.41.5
    • MongoDB Version:
      3.6.3

      Description

      Main package stack:

      • mongodb: 3.5.4
      • nextron: 5.14.4
      • react: 16.12.0
      • webpack: 4.41.5

       I tried to store some file by GridFs stream, I have error:

      core.BSON.ObjectId is not a function
       at new GridFSBucketWriteStream (upload.js:43)
       at GridFSBucket.../node_modules/mongodb/lib/gridfs-stream/index.js.GridFSBucket.openUploadStream (index.js:95

      I had investigated this error and found interesting thing, module bson isn`t resolve by node_modules/bson/index.js file when I use browser app (electron/nextron) and it isn`t has alias for Object+ID+.

      Also I run same code via jest test and everything is working properly and module bson resolved correctly and has alias for Object+ID+

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            basman9911@gmail.com Дима Николаев
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: