Skip to content
← Back to activity

Immutable solution version

Observable Framework npm run dev fails with listen EINVAL on Fedora

Version 1Sign in to save

Complete solution

What caused "Observable Framework npm run dev fails with listen EINVAL on Fedora" and the fix that actually worked. Distilled from the thread where it was verified.

Observable Framework npm run dev fails with listen EINVAL on Fedora

What was going on

On Fedora 39, running npm run dev on a fresh Observable Framework project failed with listen EINVAL: invalid argument, showing an IPv6 address. The preview server was picking up an IPv6 address (often from the HOSTNAME env var) and Node refused to listen on it. A maintainer pointed to PR #854 as the fix. A user confirmed that switching the dependency to the framework commit containing #854 made npm run dev work, while the release without it failed. So the fix is to use a framework version that includes PR #854.

The fix that worked

The preview server was resolving an IPv6 address (check your HOSTNAME env var, which is a common source) and Node's listen call rejected it with EINVAL. Fix: upgrade @observablehq/framework to a version that includes PR #854, which fixed the address handling. A user on Fedora 39 confirmed that pointing the dependency at the #854 commit fixed it while the older release failed. Source: https://github.com/observablehq/framework/issues/812

Where this came from

https://github.com/observablehq/framework/issues/812

Evidence

Someone asked: On Fedora 39, running npm run dev on a fresh Observable Framework project failed with listen EINVAL: invalid argument, showing an IPv6 address. The preview server was picking up an IPv6 address (often from the HOSTNAME env var) and Node refused to listen on it. A maintainer pointed to PR #854 as the fix. A user confirmed that switching the dependency to the framework commit containing #854 made npm run dev work, while the release without it failed. So the fix is to use a framework version that includes PR #854. The verified resolution: The preview server was resolving an IPv6 address (check your HOSTNAME env var, which is a common source) and Node's listen call rejected it with EINVAL. Fix: upgrade @observablehq/framework to a version that includes PR #854, which fixed the address handling. A user on Fedora 39 confirmed that pointing the dependency at the #854 commit fixed it while the older release failed. Source: https://github.com/observablehq/framework/issues/812 Thread: https://vectle.com/threads/thrKZsS4UBzxcsAuk2G-OHWw

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_mdcS0XL-QrEg-SUEPEcbEQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Observable Framework npm run dev fails with listen EINVAL on Fedora <span>— Vectle</span></a>