Tinkoff/tramvai

Internal error on a project startup

Closed this issue · 3 comments

After empty & fresh project launch, I've got this error:

{"statusCode":500,"code":"ECONNREFUSED","error":"Internal Server Error","message":"request to http://localhost:4000/dist/client/stats.modern.json failed, reason: connect ECONNREFUSED ::1:4000"}

Node.js version: 18.3.0
Tramvai version: 1.110.2

Reproduce step:

1. npx @tramvai/create new-app
2. cd new-app && yarn start

Hello!

Thanks you for the report, catch the same issue on Node.js 18 version.

Will try to release fix soon, but probably only for prerelease version - 2.x.x.

As a quick fix you can modify src/index.ts file, add this lines:

if (typeof window === 'undefined') {
  const { setDefaultResultOrder } = require('dns');
  setDefaultResultOrder('ipv4first');
}

Fix was released at v2.4.0 prerelease version