npm install fails due to ENOTFOUND errors

Resolved 💬 2 comments Opened Feb 4, 2026 by adiachenko Closed Feb 18, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

260203.1501 (523)

What subscription do you have?

ChatGPT Plus

What issue are you seeing?

npm install fails due to ENOTFOUND errors

npm error code ENOTFOUND
npm error syscall getaddrinfo
npm error errno ENOTFOUND
npm error network request to https://registry.npmjs.org/@astrojs%2fstarlight failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the
npm error network 'proxy' config is set properly.  See: 'npm help config'
npm error Log files were not written due to an error writing to the directory: /Users/adiachenko/.npm/_logs
npm error You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

What steps can reproduce the bug?

The issue is only reproducible in the Codex App. No errors in Codex CLI.

Ensure the packages aren't fetched from npm cache before trying to reproduce the bug:

npm cache clean --force

What is the expected behavior?

npm install completes without network errors

Additional information

~/.codex/config.toml

model = "gpt-5.2-codex"
model_reasoning_effort = "medium"
sandbox_mode = "workspace-write"
approval_policy = "on-request"
web_search = "live"
personality = "pragmatic"

[sandbox_workspace_write]
network_access = true

Tried giving sandbox_mode = "danger-full-access" as well, didn't fix the issue.

View original on GitHub ↗

2 Comments

adiachenko · 6 months ago

Note that it seems we can currently somewhat circumvent the issue by disabling sandbox and running Codex App in full access mode (press a button left of Mic/Dictate button).

However, I am not closing the issue because network access should not require you to disable sandbox entirely based on documented and apparent behavior of Codex CLI.

adiachenko · 6 months ago

In my experience this has been fixed in new versions of the app (running 26.217.1959 now) and I no longer have to elevate permissions to _"Full access"_ like I did before.

Make sure to select _"Custom (config.toml)_" in the permission dropdown.

Closing the issue now.