WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

TypeError: (0 , node_net_1.createConnection) is not a function #346

@wf-soft

Description

@wf-soft

Observed behavior

@nats-io_transport-node.js?v=79b8d203:9096 Uncaught (in promise) TypeError: (0 , node_net_1.createConnection) is not a function
at NodeTransport.dial (@nats-io_transport-node.js?v=79b8d203:9096:56)
at NodeTransport.connect (@nats-io_transport-node.js?v=79b8d203:9060:38)
at _ProtocolHandler.dial (@nats-io_transport-node.js?v=79b8d203:6784:37)
at _ProtocolHandler._doDial (@nats-io_transport-node.js?v=79b8d203:6828:24)
at async _ProtocolHandler.dodialLoop (@nats-io_transport-node.js?v=79b8d203:6869:15)

Expected behavior

const res = await connect({
servers: ['nats://localhost:4222'],
name: 'test',
});
console.log(res);

Server and client version

"server": "2.12.1"
"@nats-io/nats-core": "^3.2.0",
"@nats-io/transport-node": "^3.2.0",

Host environment

Windows
Node v24.5.0

Steps to reproduce

import { connect } from '@nats-io/transport-node';
const res = await connect({
servers: ['nats://localhost:4222'],
name: 'test',
});
console.log(res);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions