cody-greene / node-rabbitmq-client

RabbitMQ (0-9-1) client library with auto-reconnect & zero dependencies
MIT License
127 stars 9 forks source link

Cannot find module 'node:net' happened #7

Closed newwayxp closed 1 year ago

newwayxp commented 1 year ago

I used a simple js like below const Connection =require('rabbitmq-client') but exception happened. internal/modules/cjs/loader.js:883 throw err; ^

Error: Cannot find module 'node:net' Require stack:

newwayxp commented 1 year ago

my node version is v14.16.1.

cody-greene commented 1 year ago

Support for "node:" prefixed imports was added in node v14.18.

Can you upgrade to at least node-v14.18?

I test this library for v14.x v16.x and v18.x, but only the most recent patch for each branch. Also 14.x will soon be end-of-life (2023-04-30, https://nodejs.dev/en/about/releases/)

newwayxp commented 1 year ago

It's working, Thank you very much! I updated to v19.4.0