I updated the Node modules and configured the n8n proxy correctly. It’s working fine in the terminal, and I can confirm it using npm list inside the container. The n8n proxy is also responding correctly. However, when I check the same through Postman or access the website URL, it’s not working — specifically, requests related to node_modules are failing.
Below is my n8n setup with the environment variables and Dockerfile. Any suggestions on resolving this issue would be appreciated.
docker-compose.yaml:
n8n:
build: .
restart: always
ports:
- 5678:5678
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_PORT=5678
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=xxxxxxxxx
- GENERIC_TIMEZONE=UTC
- WEBHOOK_URL=https://xxxxxxx.com
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- NODE_FUNCTION_ALLOW_EXTERNAL=playwright,agentql
- NODE_FUNCTION_ALLOW_BUILTIN=*
- NODE_PATH=/usr/local/lib/node_modules
- N8N_PROXY=${N8N_PROXY}
Dockerfile:
FROM n8nio/n8n:1.80.0
USER root
RUN npm install -g express playwright agentql
USER node
