From c8c74e50ad154964df0b0a53c8d05027397aeab2 Mon Sep 17 00:00:00 2001 From: spiceoogway Date: Fri, 30 Jan 2026 03:18:52 -0500 Subject: [PATCH] Fix npm permission error for bird skill installation in Docker Fixes #4130 When running as the non-root 'node' user in Docker, npm global installs fail with EACCES errors because /usr/local/lib/node_modules is owned by root. This commit configures npm to use a user-writable directory (/home/node/.npm-global) for global packages, allowing skills like bird (@steipete/bird) to install successfully. Changes: - Set npm prefix to /home/node/.npm-global after USER node directive - Add the new npm global bin directory to PATH This follows Docker best practices for npm global installs in non-root containers and fixes all npm-based skill installations. --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 904d1d97d..b56ee94cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,10 @@ ENV NODE_ENV=production # This reduces the attack surface by preventing container escape via root privileges USER node +# Configure npm to use a user-writable directory for global packages +# This prevents EACCES errors when installing skills that use npm packages +# (e.g., bird skill: @steipete/bird) +RUN npm config set prefix /home/node/.npm-global +ENV PATH="/home/node/.npm-global/bin:${PATH}" + CMD ["node", "dist/index.js"]