openclaw - ✅(Solved) Fix [Bug]: docker images lack of permission to run npm install [2 pull requests, 1 participants]

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…
GitHub stats
openclaw/openclaw#59601Fetched 2026-04-08 02:42:43
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
cross-referenced ×2labeled ×2referenced ×1renamed ×1

following docker images lack of permission to run npm install:

  • ghcr.io/openclaw/openclaw:main
  • ghcr.io/openclaw/openclaw:main-slim
  • ghcr.io/openclaw/openclaw:2026.4.1
  • ghcr.io/openclaw/openclaw:2026.4.1-slim

Error Message

Install failed: clawhub (exit 243) — npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log npm error code EACCES npm error syscall mkdir npm error path /usr/local/lib/node_modules/clawhub npm error errno -13 npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/clawhub' npm error at async mkdir (node:internal/fs/promises:856:10) npm error at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:572:20 npm error at async Promise.allSettled (index 0) npm error at async #reifyPackages (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:309:11) npm error at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5) npm error at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:151:5) npm error at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9) npm error at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) { npm error errno: -13, npm error code: 'EACCES', npm error syscall: 'mkdir', npm error path: '/usr/local/lib/node_modules/clawhub' npm error } npm error npm error The operation was rejected by your operating system. npm error It is likely you do not have the permissions to access this file as the current user npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm notice npm notice New minor version of npm available! 11.9.0 -> 11.12.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1 npm notice To update run: npm install -g [email protected] npm notice npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log

Root Cause

following docker images lack of permission to run npm install:

  • ghcr.io/openclaw/openclaw:main
  • ghcr.io/openclaw/openclaw:main-slim
  • ghcr.io/openclaw/openclaw:2026.4.1
  • ghcr.io/openclaw/openclaw:2026.4.1-slim

Fix Action

Fixed

PR fix notes

PR #1: fix npm install lack of perms problem in docker

Description (problem / solution / changelog)

fix issue #59601

Changed files

  • Dockerfile (modified, +1/-0)

PR #60052: fix(docker): npm lack of perms to run install in docker

Description (problem / solution / changelog)

fix issue #59601

Changed files

  • Dockerfile (modified, +2/-0)

Code Example

OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:main-slim" \
./scripts/docker/setup.sh

---

Install failed: clawhub (exit 243) — npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log
npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/lib/node_modules/clawhub
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/clawhub'
npm error     at async mkdir (node:internal/fs/promises:856:10)
npm error     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:572:20
npm error     at async Promise.allSettled (index 0)
npm error     at async #reifyPackages (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:309:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:151:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/lib/node_modules/clawhub'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm notice
npm notice New minor version of npm available! 11.9.0 -> 11.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1
npm notice To update run: npm install -g npm@11.12.1
npm notice
npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

following docker images lack of permission to run npm install:

  • ghcr.io/openclaw/openclaw:main
  • ghcr.io/openclaw/openclaw:main-slim
  • ghcr.io/openclaw/openclaw:2026.4.1
  • ghcr.io/openclaw/openclaw:2026.4.1-slim

Steps to reproduce

  1. run docker setup:
OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:main-slim" \
./scripts/docker/setup.sh
  1. in step "Install missing skill dependencies" choose any one skill

  2. in step "Preferred node manager for skill installs" choose npm

  3. then error happened

Expected behavior

no error

Actual behavior

Install failed: clawhub (exit 243) — npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log
npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/lib/node_modules/clawhub
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/clawhub'
npm error     at async mkdir (node:internal/fs/promises:856:10)
npm error     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:572:20
npm error     at async Promise.allSettled (index 0)
npm error     at async #reifyPackages (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:309:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:151:5)
npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9)
npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/lib/node_modules/clawhub'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm notice
npm notice New minor version of npm available! 11.9.0 -> 11.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1
npm notice To update run: npm install -g [email protected]
npm notice
npm error A complete log of this run can be found in: /home/node/.npm/_logs/2026-04-02T10_03_55_166Z-debug-0.log

OpenClaw version

ghcr.io/openclaw/openclaw:main-slim

Operating system

macOS 26.3

Install method

No response

Model

none

Provider / routing chain

none

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can likely be resolved by running the npm install command with elevated permissions or changing the ownership of the /usr/local/lib/node_modules directory.

Guidance

  • The error message indicates a permission issue (EACCES) when trying to install dependencies using npm. This suggests that the user running the command does not have write access to the /usr/local/lib/node_modules directory.
  • To verify the issue, check the permissions of the /usr/local/lib/node_modules directory and its containing directories.
  • To mitigate the issue, try running the npm install command with elevated permissions using sudo or change the ownership of the /usr/local/lib/node_modules directory to the current user.
  • Consider using a different directory for installing dependencies, such as a user-specific directory, to avoid permission issues.

Example

# Change ownership of the directory to the current user
sudo chown -R $USER:$USER /usr/local/lib/node_modules

# Alternatively, run the command with elevated permissions
sudo npm install

Notes

The issue may be specific to the openclaw images and the way they are configured. The solution may vary depending on the specific use case and requirements.

Recommendation

Apply workaround: Run the npm install command with elevated permissions or change the ownership of the /usr/local/lib/node_modules directory to avoid permission issues. This is a temporary solution until a more permanent fix can be implemented.

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…

FAQ

Expected behavior

no error

Still need to ship something?

×6

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

Back to top recommendations

TRENDING