gemini-cli - 💡(How to fix) Fix refactor: move sandboxImageUri out of package.json 'config' to resolve npm warnings

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

npm warn Unknown cli config "sandboxImageUri" (@google/gemini-cli:sandboxImageUri). This will stop working in the next major version of npm.

Code Example

npm warn Unknown cli config "sandboxImageUri" (@google/gemini-cli:sandboxImageUri). This will stop working in the next major version of npm.
RAW_BUFFERClick to expand / collapse

What happened?

Running npm run build triggers several warnings:

npm warn Unknown cli config "sandboxImageUri" (@google/gemini-cli:sandboxImageUri). This will stop working in the next major version of npm.

This occurs on newer versions of npm (v11+). npm interprets the config top-level field in package.json as its own configuration namespace and warns about unknown keys.

What did you expect to happen?

Clean build output without npm configuration warnings.

Client information

<details> <summary>Client Information</summary>

OS: Linux Node: v24.13.0 npm: v11.12.1

</details>

Additional context

The sandboxImageUri is currently stored in the config block of package.json. Moving this to a custom top-level field (like sandboxConfig) would resolve the conflict with npm's internal configuration.

extent analysis

TL;DR

Move the sandboxImageUri configuration from the config block to a custom top-level field in package.json to resolve the npm warning.

Guidance

  • Identify the config block in package.json and locate the sandboxImageUri key.
  • Create a new custom top-level field, such as sandboxConfig, in package.json.
  • Move the sandboxImageUri key from the config block to the new sandboxConfig field.
  • Verify that running npm run build no longer produces the unknown cli config warning.

Example

// Before
{
  "config": {
    "sandboxImageUri": "some-uri"
  }
}

// After
{
  "sandboxConfig": {
    "sandboxImageUri": "some-uri"
  }
}

Notes

This solution assumes that the sandboxImageUri configuration is not used by any other scripts or dependencies that rely on it being in the config block. Additional updates may be necessary to reference the new location of the configuration.

Recommendation

Apply workaround: Move the sandboxImageUri configuration to a custom top-level field, as this resolves the conflict with npm's internal configuration and prevents future warnings.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix refactor: move sandboxImageUri out of package.json 'config' to resolve npm warnings