Can't build custom n8n image

Building custom n8n image fails on ‘pnpm run build’ stage

ERROR: command finished with error: command (/src/packages/editor-ui) /usr/local/bin/pnpm run build exited (1)

178.3 n8n-editor-ui#build: command (/src/packages/editor-ui) /usr/local/bin/pnpm run build exited (1)

Information on your n8n setup

  • n8n version: Latest version of Master branch
  • Database (default: SQLite): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Digital Ocean Droplet: Linux, Ubuntu

I try running pnpm run build from route, and it works. However, when running
‘docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile .’ from route, it ends up failing (screenshot attached). I’m struggling. Can anyone please help me?

hello @Liza_Ilyina

I assume the issue is with that part:

@barn4k Yes, that’s what I thought too (85.55 & 85.56). This does not happen when running ‘npm run build’ from route folder but appears when trying to build the image. However, these files are present in the repository. Do you have any ideas on how to fix this?

I’m using unmodified latest version of n8n github repository.

Nah, I don’t have npm expertise, summoning @Jon here :slight_smile:

Hi, I’m still struggling with it. It would be so helpful if someone more familiar with the codebase could take a look :pray:
@barn4k @Jon

Hey @Jon @barn4k, I’m still stuck with this error, can I please ask you to look into it?:pray::sweat:

Considering that custom images have been building without any issues on the CI, I assume there is something broken on your local setup.
Would it be possible for you to push your repo to github, and use the action instead?

1 Like

Hey @netroy, thanks, that worked!

1 Like

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