Skip to content

Bug mongodb&asciidoc plugins #39291

@salvonapo1972

Description

@salvonapo1972

Preliminary Checks

Description

Hi all,I've a problem with mongodb-source-plugin and gatsby-transformer-asciidoc.
When I put both in gatsby-config.js I have this error:

(node:96340) [DEP0170] DeprecationWarning: The URL
mongodb://gatsbyjsmongodbuser:[email protected]:27017,ac-lhgd1vv-shard-00-00.lldnjpu.mongodb.net:27017,ac-lhgd1vv-sha
rd-00-01.lldnjpu.mongodb.net:27017/?authSource=admin&replicaSet=atlas-ljxvgd-shard-0&connectTimeoutMS=1200000%2FCampionatoserieA&ssl=true is invalid. Future
versions of Node.js will throw an error.
(Use node --trace-deprecation ... to show where the warning was created)

⠋ source and transform nodes
D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^

TypeError: this.hosts.map is not a function
at new ServerDescription (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\server_description.js:93:29)
at Monitor. (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\server.js:156:9)
at Monitor.emit (node:events:536:35)
at D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\monitor.js:292:13
at callback (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\connection\connect.js:75:5)
at D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\connection\connect.js:165:7
at MessageStream.messageHandler (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\connection.js:308:5)
at MessageStream.emit (node:events:524:28)
at processIncomingData (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
at MessageStream._write (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at TLSSocket.ondata (node:internal/streams/readable:1009:22)
at TLSSocket.emit (node:events:524:28)
at addChunk (node:internal/streams/readable:561:12)

Node.js v22.12.0

P.S.:Commenting gatsby-transformer-asciidoc there are no problems

Reproduction Link

https://github.com/salvonapo1972/GatsbyTest

Steps to Reproduce

1.Create a starter gatsbyjs project:npx gatsby new gatsby-starter-default https://github.com/gatsbyjs/gatsby-starter-default
2.Adding mongodb-source-plugin and gatsby-transformer-asciidoc plugins to starter project and gatsby-config.js
3.execute npm run develop
4.Commenting gatsby-transformer-asciidoc there are no problems

Expected Result

Build is ok

Actual Result

Build has errors with mongodb plugin

(node:96340) [DEP0170] DeprecationWarning: The URL
mongodb://gatsbyjsmongodbuser:[email protected]:27017,ac-lhgd1vv-shard-00-00.lldnjpu.mongodb.net:27017,ac-lhgd1vv-sha
rd-00-01.lldnjpu.mongodb.net:27017/?authSource=admin&replicaSet=atlas-ljxvgd-shard-0&connectTimeoutMS=1200000%2FCampionatoserieA&ssl=true is invalid. Future
versions of Node.js will throw an error.
(Use node --trace-deprecation ... to show where the warning was created)

⠋ source and transform nodes
D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^

TypeError: this.hosts.map is not a function
at new ServerDescription (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\server_description.js:93:29)
at Monitor. (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\server.js:156:9)
at Monitor.emit (node:events:536:35)
at D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\sdam\monitor.js:292:13
at callback (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\connection\connect.js:75:5)
at D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\core\connection\connect.js:165:7
at MessageStream.messageHandler (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\connection.js:308:5)
at MessageStream.emit (node:events:524:28)
at processIncomingData (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
at MessageStream._write (D:\Progetti\Gatsby\gatsbystarter\gatsby-starter-default\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at TLSSocket.ondata (node:internal/streams/readable:1009:22)
at TLSSocket.emit (node:events:524:28)
at addChunk (node:internal/streams/readable:561:12)

Node.js v22.12.0

Environment

System:

Windows:11

Config Flags

Not flags

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: triage neededIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions