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

ECONNRESET when registering schema #7

Open
mattdesl opened this issue Feb 15, 2024 · 3 comments
Open

ECONNRESET when registering schema #7

mattdesl opened this issue Feb 15, 2024 · 3 comments

Comments

@mattdesl
Copy link

I'm trying to run the example in the tutorial, and my aquadoggo node is running in another terminal process (v0.7.1), and then I run npm run schema and get this error:

Create and deploy schemas for the mushroom tutorial app
/mushroom-app-tutorial/node_modules/node-fetch/lib/index.js:1491
			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
          ^
FetchError: request to http://localhost:2020/graphql failed, reason: socket hang up
    at ClientRequest.<anonymous> (/mushroom-app-tutorial/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at ClientRequest.emit (node:domain:489:12)
    at Socket.socketOnEnd (node:_http_client:519:9)
    at Socket.emit (node:events:525:35)
    at Socket.emit (node:domain:489:12)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}

When I terminate the node and re-run the script, I get ECONNREFUSED as I might expect.

@sandreae
Copy link
Member

Thanks for the report 👍 could you provide your system information and I wonder if you're using the release binaries for aquadoggo or you compiled it yourself?

@adzialocha
Copy link
Member

adzialocha commented Feb 15, 2024

This might be related to an issue in NodeJS: nodejs/node#40702 not supporting happy eyeballs?

Maybe try with NodeJS v20? Otherwise there seems to be this DNS config mentioned in this issue one can add as a workaround:

nodejs/node#40702 (comment)

@mattdesl
Copy link
Author

mattdesl commented Feb 16, 2024

macOS 13.0, node 19. used the latest pre-built binary for apple m2 (aquadoggo-v0.7.1-aarch64-apple-darwin).

however I just updated to node 21.6.2 (npm 10.2.4) and now I get a different error, even after deleting and re-cloning/installing the example.

mushroom-app-tutorial % npm run schema

> [email protected] schema
> ts-node --esm --transpileOnly ./register-schema.ts

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/matt/prj/mushroom-app-tutorial/register-schema.ts
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:143:22)
    at async nextLoad (node:internal/modules/esm/hooks:750:22)
    at async nextLoad (node:internal/modules/esm/hooks:750:22)
    at async Hooks.load (node:internal/modules/esm/hooks:383:20)
    at async handleMessage (node:internal/modules/esm/worker:199:18) {
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

EDIT: If I remove --esm and re-run the command, I get the original ECONNRESET error again.

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

3 participants