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

WARNING: Detected use of sync API - node_modules\mongodb

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.3
    • Component/s: None

      Install mongoose

       
            "mongoose": "^5.10.13",
       
      Run a node application using below:

       
          nodemon --trace-sync-io ./bin/www
       
      You will see following errors:
       
       
      (node:12608) WARNING: Detected use of sync API at realpathSync (fs.js:1685:13) at toRealPath (internal/modules/cjs/loader.js:344:13) at Module._findPath (internal/modules/cjs/loader.js:487:24) at Module._resolveFilename (internal/modules/cjs/loader.js:867:27) at Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19) at NativeTopology (\node_modules\mongodb\lib\topologies\native_topology.js:47:5)
      {{ (node:12608) WARNING: Detected use of sync API at realpathSync (fs.js:1727:29) at toRealPath (internal/modules/cjs/loader.js:344:13) at Module._findPath (internal/modules/cjs/loader.js:487:24) at Module._resolveFilename (internal/modules/cjs/loader.js:867:27) at Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19) at NativeTopology (\node_modules\mongodb\lib\topologies\native_topology.js:47:5)}}
      {{ (node:12608) WARNING: Detected use of sync API at openSync (fs.js:473:26) at readFileSync (fs.js:377:35) at Module._extensions..json (internal/modules/cjs/loader.js:1098:22) at Module.load (internal/modules/cjs/loader.js:928:32) at Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19) at NativeTopology (\node_modules\mongodb\lib\topologies\native_topology.js:47:5)}}
      {{ (node:12608) WARNING: Detected use of sync API at tryStatSync (fs.js:339:25) at readFileSync (fs.js:379:17) at Module._extensions..json (internal/modules/cjs/loader.js:1098:22) at Module.load (internal/modules/cjs/loader.js:928:32) at Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19) at NativeTopology (\node_modules\mongodb\lib\topologies\native_topology.js:47:5)}}
      {{ (node:12608) WARNING: Detected use of sync API at readSync (fs.js:590:26) at tryReadSync (fs.js:366:20) at readFileSync (fs.js:395:19) at Module._extensions..json (internal/modules/cjs/loader.js:1098:22) at Module.load (internal/modules/cjs/loader.js:928:32) at Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19)}}
      {{ (node:12608) WARNING: Detected use of sync API at closeSync (fs.js:438:11) at readFileSync (fs.js:412:8) at Module._extensions..json (internal/modules/cjs/loader.js:1098:22) at Module.load (internal/modules/cjs/loader.js:928:32) at Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at makeClientMetadata (\node_modules\mongodb\lib\core\utils.js:239:16) at Topology (\node_modules\mongodb\lib\core\sdam\topology.js:122:19) at NativeTopology (\node_modules\mongodb\lib\topologies\native_topology.js:47:5)}}
      {{ (node:12608) WARNING: Detected use of sync API at pbkdf2Sync (internal/crypto/pbkdf2.js:48:15) at HI (\node_modules\mongodb\lib\core\auth\scram.js:292:29) at continueScramConversation (\node_modules\mongodb\lib\core\auth\scram.js:155:26) at \node_modules\mongodb\lib\core\auth\scram.js:111:5 at messageHandler (\node_modules\mongodb\lib\cmap\connection.js:277:5) at emit (events.js:315:20) at processIncomingData (\node_modules\mongodb\lib\cmap\message_stream.js:144:12) at _write (\node_modules\mongodb\lib\cmap\message_stream.js:42:5) at writeOrBuffer (_stream_writable.js:352:12) at Writable.write (_stream_writable.js:303:10)}}

            Assignee:
            Unassigned Unassigned
            Reporter:
            pgmreddy@outlook.com G Manohar Reddy Poreddy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: