Code Node external module not working

I am having an error in my code node require external module. i need puppeteer. i know there is a puppeteer community node, but its not working from me for some reason. so i am trying to just run it in a code node instead.

Error:

I tried to npm install in the /home/node which you can see in an execute command node npm list. i am not sure what im doing wrong.

Environment Variables:

Information on your n8n setup

  • n8n version: 1.81.4
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): not sure, selfhost
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: linux selfhost

Your setup seems correct at a glance. You may just need to reboot the instance to register the new external packages.

You may have to import the packages a different way if still encountering issues, I have not tested this myself so far.

@ThinkBot hey thanks for your response. i tried to restart my container, and even redeployed also. but it is the same error, cannot fine module puppeteer when running the code node.

one thing though, when i try to restart my container, i needed to install npm puppeteer again. is that normal?

This may help further:

i cant get this working. i’ll just deploy a script and call it via api in an n8n workflow :confused:

2 Likes

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