- Add axios (^1.10.0) for n8n API client - Add zod (^3.25.32) for workflow validation - Update runtime package version to 2.6.2 - Update Dockerfile comment to reflect minimal (not zero) dependencies Fixes Docker runtime error: "Cannot find module 'axios'" introduced by n8n management tools in v2.6.0 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1008 B
1008 B
Docker Fix for v2.6.2 - Missing Runtime Dependencies
Issue
After v2.6.0, the Docker image started failing with:
Error: Cannot find module 'axios'
Root Cause
In v2.6.0, we added n8n management tools that require:
axios- For HTTP API calls to n8n instanceszod- For workflow validation schemas
However, our ultra-optimized Docker image uses package.runtime.json which didn't include these new dependencies.
Fix
Updated package.runtime.json to include:
"axios": "^1.10.0",
"zod": "^3.25.32"
Impact
- Docker image size increases slightly (~5MB) but remains much smaller than full n8n dependencies
- No changes needed to Dockerfile itself - just the runtime package list
- Users need to pull the latest Docker image after rebuild
Prevention
When adding new features that require additional npm packages, always check:
- Is the package needed at runtime?
- If yes, add it to
package.runtime.jsonfor Docker builds - Test the Docker image before release