Skip to content

ECONNREFUSED Error Flood During Test Runs with @nuxt/scripts v0.9.5 #355

Closed
@tgaeta

Description

@tgaeta

🐛 The bug

During test execution, while all tests are passing successfully, the process is generating a continuous cascade of ECONNREFUSED errors attempting to connect to 0.0.0.0:443. These errors appear to be unhandled 'error' events that don't affect test results but pollute the console output significantly. Began to surface when @nuxt/scripts v0.9.5 was introduced into the codebase.

Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16)
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '0.0.0.0',
port: 443

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-pkwfkx

🌈 Expected behavior

Test execution should complete cleanly without Error: connect ECONNREFUSED warnings.

ℹ️ Additional context

Using:

"@nuxt/test-utils": "^3.14.3",
"@testing-library/vue": "^8.1.0",
"@vitest/coverage-v8": "2.1.3",
"@vue/test-utils": "^2.4.6",
"nuxt": "latest",
"vitest": "^2.1.3"
  • Coverage is enabled with v8
  • All tests are passing despite the errors
  • The errors seem to be related to attempted HTTPS connections to localhost (0.0.0.0:443)
  • The issue appears to be an underlying network connection attempt that isn't properly handled, rather than a test failure

Screenshot

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions