Broken code nodes because of a dependency

Hello community,

After upgrading to n8n version 1.22.6 some of our nodejs code nodes broke, because @aws-sdk/client-s3 is missing. We use the following code to import S3:
const { S3Client, GetObjectCommand } = require (“@aws-sdk/client-s3”);

However it now results in an error like: Cannot find module ‘@aws-sdk/client-s3’ [line 1]

Importing S3 like this is necessary for us, as our n8n runs on AWS and infers the S3 credentials from the role that the container has. We also don’t build a custom container for n8n, and just use the one from dockerhub. Is there a fix coming?

  • n8n version: n8nio/n8n:1.22.6
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: n/a

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Boris_Idesman,

We do update our dependencies so I wouldn’t recommend relying on what we ship with, What you can do though is make your own docker image that includes the package and you should be good to continue using it again.

1 Like