I am trying to install community_nodes manually.
But so far if I understand correctly I have to add in the n8n configuration NODE_FUNCTION_ALLOW_EXTERNAL AND N8N_CUSTOM_EXTENSIONS.
The problem is that if I add these two lines to my docker-compose.yml then n8n does not start at all on the server.
And adding to .env has no effect.
Also the author of n8n-nodes-puppeteer-extended created a medium article how to build/run a docker image a couple of days ago.
The important part in the docker image is installing the chromium dependencies and finally install the npm package into the global n8n installation path. Be aware that the author uncommented the last line for some reason.
It looks like the N8N_CUSTOM_EXTENSIONS path expects the build output of custom nodes, so you could try mapping the dist folder.
You do not need NODE_FUNCTION_ALLOW_EXTERNAL to make this work. The config is for the Function node and if you can import external modules inside your javascript code there.
@marcus N8N_CUSTOM_EXTENSIONS using any path causes n8n to not load at all. This is a very strange behavior because it should at most simply not load community nodes and not block n8n operation.
@Jon
I have ‘restart: always’ configured and am using nginx.
When I set ‘N8N_CUSTOM_EXTENSIONS’ I get the nginx error page all the time (this is normal with me, it means that nginx doesn’t receive anything from the application) so n8n doesn’t start at all.
Perfect, So do you see those 3 lines repeating in the log or do you only see those 3? Repeating would tell me that it is crashing and restarting at that point, If it is just those 3 lines it would suggest it is still trying to load so it could be that something else is going on.
I take it you have the node files in place and the pre-req for the node is installed in your docker image?
I installed n8n based on docker-compose and that’s it.
I have installed add-ons via community-node several times and removed them. Currently I have 1 add-on installed via UI.
And I wanted to try to install the add-on manually.
I installed via npm as instructed and wanted to add the path.
I have just given it a quick go and it appears to work how @marcus has suggested. On my Docker host I have created /home/docker/nodes/ and in there I ran…
git clone https://github.com/hckdotng/n8n-nodes-puppeteer-extended.git
cd n8n-nodes-puppeteer-extended/
npm i
npm run build
With the node now built I have then set up a volume in my container so that I can access /home/docker/nodes/ from /custom-nodes I have then set N8N_CUSTOM_EXTENSIONS=/custom-nodes/n8n-nodes-puppeteer-extended/dist/nodes/Puppeteer, Started my container up and I can see the below.
As another test I have deleted that attempt and just ran npm install n8n-nodes-puppeteer-extended then set N8N_CUSTOM_EXTENSIONS=/custom-nodes/ and that has also worked.
The path in custom_extensions is full to Puppeteer as you have shown because otherwise the logs return a
{ "level": "debug", "message": "No codex available for: Puppeteer.node.js","metadata":{"file":"LoadNodesAndCredentials.js","function":"addCodex","timestamp":"2022-10-01T12:28:38.359Z"}}
I am not sure what else it could be, I know for me once the container was restarted I had to do a cmd+shift+r to force a refresh for the node to show up.
What happens if you just point it to /custom-nodes and let it work it out itself?