Information on your n8n setup
- n8n version: 1.104.1
- Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): Default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: 22.04
Hello.
I’m trying to load up the library pdf-lib for my Code node. What I did:
- Change the Docker environment:
NODE_FUNCTION_ALLOW_EXTERNAL=pdf-lib - SSH into the n8n container:
docker exec -it n8n sh - Install the library:
cd ~/.n8n/nodes && npm install pdf-lib- This does not work. Still library not found. - Install the library in a different location:
cd /usr/local/lib && npm install pdf-lib- I run into permission problems.
So, how exactly do I add the library to node_modules so it’s available for my code node?
