I am currently happily using an unmaintained fork of n8n from here:
This integrates and exposes a ton of useful functionality of puppeteer as a custom node.
The problem I’m having now is that I want to get even deeper into the advanced puppeteer functions that
aren’t exposed to the node interface and use them in a code node. Ideally, I’d like to have both options available (and would be awesome if they could talk to each other but I’m doubtful that will work).
I was expecting that since the custom node has all the libraries I need as dependencies, that I could just call them within the code node, but apparently code node external libraries need to follow a separate install path, especially puppeteer. If I call puppeteer from the code node, even with it specifically whitelisted as external module in the env vars, n8n says module not found.
Is there a way I can point the code node require statement to the custom node’s modules or do i have to have the whole puppeteer install in two different places for the different use cases?
I’ve reached out to the fork creator but haven’t seen any activity from him for over a year.
- n8n version: 0.231.1
- Running n8n via Docker
Hi @gzim, while I’m not familiar with Puppeteer, I did find some instructions from @marcus on how to add Puppeteer in making a custom Docker image that might help: GitHub - maspio/n8n-puppeteer-docker
Thanks for your response, but that fork does what I’m already doing. I have a working custom node for some puppeteer functions, but what I want is to have the full functionality by having the puppeteer js modules available to a code node.
this isnt the answer you are looking for, but I found it easier to ssh to another linux machine I have all the stuff I need installed on and execute the commands.
so I use a set node, write my advanced functions, add a convert to binary node and make the advanced puppeteer script into a aaaaa.js file, ssh that over to my linux box execute it and then pull back the info into the flow and carry on.
Its been rock solid for me, and saved me hours of pain trying to get it to work in the code nodes, I have tried and gave up, wasn’t worth the time for me at least.
Sorry that’s not much help, but wanted to give an alternative.
The other thing I use is browserless, that allows a similar advanced functionality in the code node itself, might want to look into that too?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.