Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node helloworld fail with "nats.subscribe is not a function" #240

Open
antoinetran opened this issue Oct 20, 2023 · 0 comments
Open

node helloworld fail with "nats.subscribe is not a function" #240

antoinetran opened this issue Oct 20, 2023 · 0 comments

Comments

@antoinetran
Copy link

antoinetran commented Oct 20, 2023

Hi,

Following https://resgate.io/docs/writing-services/01hello-world/ and https://github.com/resgateio/resgate/blob/master/examples/hello-world/server.js, I tried it.

Current symptoms:

node hello-world.js
.../nats/nats-testtools/hello-world.js:3
nats.subscribe('get.example.model', (req, reply) => {
     ^

TypeError: nats.subscribe is not a function
    at Object.<anonymous> (.../nats/nats-testtools/hello-world.js:3:6)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

Expected behavior:
The hello-world works.

How to reproduce:

npm install nats
node hello-world.js

Env:
CentOS 7
node 17.9.1 and 12.18.3
Helm charts:
my-nats nats 1 2023-10-19 11:00:57.168363348 +0000 UTC deployed nats-0.19.11 2.9.14-alpine
my-resgate nats 3 2023-10-20 11:54:14.393835176 +0000 UTC deployed resgate-0.1.1 1.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant