Describe the issue/error/question
Building a custom docker image fails at the pnpm build step when building a docker image following the official steps on the github custom image guide. This happens with the repo unmodified and also with changes. Running pnpm build directly works fine and I am able to run pnpm start.
What is the error message (if any)?
n8n-editor-ui:build: ERROR: command finished with error: command (/home/node/packages/editor-ui) pnpm run build exited
I’m available to help fix the issue.
Hey @gamhESA,
Welcome to the community 
Can you share more of the output? There should be more information to show why it is failing.
I expected there to be more
is that from the latest master branch?
Yes, slightly modified though I added these lines before the pnpm build step:
RUN cd packages/editor-ui && pnpm install
RUN cd ../..
if that would have made a difference. It didn’t.
Here is the log from the master branch I pulled a few hours ago with the Dockerfile untouched same error:
If this also helps. I’m running this on macOS Montery.
I’ve tried with my node version set to 18.15 and also 16.20
I’ve also tried with the ARG NODE_VERSION=18
Can you share the command you are using to build? I can give it a quick go
From the root folder of the repo I run:
docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile .
Alright, That fails for me as well. I will do some digging and see what I can find.
Hello Jon, have you been able to find anything that could help with this?
Hey @gamhESA,
I didn’t find anything overnight, Going to look into it this morning.
Hey @gamhESA,
So I did another build which failed then bumped up the memory available to Docker and that got it working, I was just starting to chat internally about it and it looks like a fix had already been merged to resolve the issue… If you pull the latest master changes you should be able to build.