External libraries are not installed on N8N

Hi! Help! Help!
I want to clarify that I am new to N8N and Docker.
I have an N8N on an Ionos server.
The problem I’m having is that I want to run JavaScript or Python code with libraries that need to be installed, for example:
Javascript: pdf-lib or puppeteer.
Python: reportlab.

And I go into the N8N Docker container and install the libraries. But N8N doesn’t recognize them.

Can anyone tell me how to run code with these libraries?

What I need to do is create an invoice-type PDF.

Version N8N: 1.82.3


welcome to the community!

You also need to make sure to add the env options in your n8n docker container to allow external packages.

NODE_FUNCTION_ALLOW_EXTERNAL

Could you tell me how to do that?

In your container setup you should have some environment variables set, this is one of those and you need to set it. If it is just you on the instance setting it to =* should be fine.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.