diff --git a/Dockerfile b/Dockerfile index f5f4e1a..4aea54f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.7 -# Ultra-optimized Dockerfile - no n8n dependencies needed at runtime +# Ultra-optimized Dockerfile - minimal runtime dependencies (no n8n packages) # Stage 1: Builder (TypeScript compilation only) FROM node:20-alpine AS builder diff --git a/docs/docker-fix-v2.6.2.md b/docs/docker-fix-v2.6.2.md new file mode 100644 index 0000000..fbe616d --- /dev/null +++ b/docs/docker-fix-v2.6.2.md @@ -0,0 +1,32 @@ +# 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 instances +- `zod` - 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: +```json +"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: +1. Is the package needed at runtime? +2. If yes, add it to `package.runtime.json` for Docker builds +3. Test the Docker image before release \ No newline at end of file diff --git a/package.runtime.json b/package.runtime.json index e3cf6fb..66c0aa7 100644 --- a/package.runtime.json +++ b/package.runtime.json @@ -1,6 +1,6 @@ { "name": "n8n-mcp-runtime", - "version": "2.4.1", + "version": "2.6.2", "description": "n8n MCP Server Runtime Dependencies Only", "private": true, "dependencies": { @@ -8,7 +8,9 @@ "better-sqlite3": "^11.10.0", "sql.js": "^1.13.0", "express": "^5.1.0", - "dotenv": "^16.5.0" + "dotenv": "^16.5.0", + "axios": "^1.10.0", + "zod": "^3.25.32" }, "engines": { "node": ">=16.0.0"