Having Issue while updating to from 0.234.1 to 1.22.6

Describe the problem/error/question

Having issue

 => ERROR [n8n  8/11] RUN    npm_config_user=root &&    pnpm install &&    pnpm build                                                                                                                  7.4s 
------                                                                                                                                                                                                      
 > [n8n  8/11] RUN                      npm_config_user=root &&                         pnpm install &&                         pnpm build:                                                                 
0.932 Scope: all 13 workspace projects                                                                                                                                                                      
3.836                                                                                                                                                                                                       
4.640 . preinstall$ node scripts/block-npm-install.js                                                                                                                                                       
4.683 . preinstall: Done                                                                                                                                                                                    
4.825 Done in 4.3s
5.332 
5.332 > [email protected] build /n8n
5.332 > turbo run build
5.332 
6.606 • Packages in scope: @n8n/chat, @n8n/client-oauth2, @n8n/n8n-nodes-langchain, @n8n/permissions, @n8n_io/eslint-config, n8n, n8n-core, n8n-design-system, n8n-editor-ui, n8n-node-dev, n8n-nodes-base, n8n-workflow
6.606 • Running build in 12 packages
6.606 • Remote caching disabled
6.607 @n8n/client-oauth2:build: cache miss, executing ffd937db8ed40701
6.611 @n8n/permissions:build: cache miss, executing ea8a6efeffbd675a
6.613 n8n-design-system:build: cache miss, executing 82682d5fc0f4a9c4
6.616 n8n-workflow:build: cache miss, executing bded664a46a5054f
7.167 @n8n/permissions:build: 
7.167 @n8n/permissions:build: > @n8n/[email protected] build /n8n/packages/@n8n/permissions
7.167 @n8n/permissions:build: > tsc -p tsconfig.build.json
7.167 @n8n/permissions:build: 
7.172 n8n-workflow:build: 
7.172 n8n-workflow:build: > [email protected] build /n8n/packages/workflow
7.172 n8n-workflow:build: > tsc -p tsconfig.build.json
7.172 n8n-workflow:build: 
7.174 n8n-design-system:build: 
7.174 n8n-design-system:build: > [email protected] build /n8n/packages/design-system
7.174 n8n-design-system:build: > vite build
7.174 n8n-design-system:build: 
7.186 @n8n/client-oauth2:build: 
7.186 @n8n/client-oauth2:build: > @n8n/[email protected] build /n8n/packages/@n8n/client-oauth2
7.186 @n8n/client-oauth2:build: > tsc -p tsconfig.build.json
7.186 @n8n/client-oauth2:build: 
7.291 n8n-design-system:build: Segmentation fault
7.295 n8n-design-system:build:  ELIFECYCLE  Command failed with exit code 139.
7.334 n8n-design-system:build: ERROR: command finished with error: command (/n8n/packages/design-system) pnpm run build exited (1)
7.340 @n8n/client-oauth2:build:  ELIFECYCLE  Command failed.
7.340 @n8n/permissions:build:  ELIFECYCLE  Command failed.
7.340 n8n-workflow:build:  ELIFECYCLE  Command failed.
7.341 @n8n/permissions:build:  WARN   Local package.json exists, but node_modules missing, did you mean to install?
7.348 n8n-core:build: cache miss, executing d186c4119ec2d780
7.349 n8n-design-system#build: command (/n8n/packages/design-system) pnpm run build exited (1)
7.349 
7.349  Tasks:    0 successful, 5 total
7.350 Cached:    0 cached, 5 total
7.350   Time:    1.948s 
7.350 Failed:    n8n-design-system#build
7.350 
7.350  ERROR  run failed: command  exited (1)
7.362  ELIFECYCLE  Command failed with exit code 1.
------
failed to solve: process "/bin/sh -c npm_config_user=root && \t\t\tpnpm install && \t\t\tpnpm build" did not complete successfully: exit code: 1

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

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

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:
  • n8n version: 0.234.1
  • Database (default: SQLite): PGSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: MAC

Hey @Gouravdev,

Are you building a custom docker image or upgrading using the official image? There were a number of v1 changes so if you are using a custom docker image you may need to make some changes which can be found in our Custom docker file.

FROM ubuntu:latest

	#### SET THIS ARGUMENT TO THE DESIRED N8N VERSION ####
		ARG N8N_VERSION
		RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi

	#### INSTALLING PRE-REQUISITES AND NODE-18 ####
		RUN \
			apt-get update && \
			apt-get -y install curl git gosu && \
			apt-get install build-essential python2 -y && \
			cd ~ && \
			curl -sL https://deb.nodesource.com/setup_18.x -o /tmp/nodesource_setup.sh && \
			bash /tmp/nodesource_setup.sh && \
			apt-get install nodejs -y

	#### SETTING CUSTOM USER TO RUN N8N ####
	USER \
		root

	#### IMPORT N8N SOURCE-CODE FOR ASKED VERSION ####
		RUN \
			mkdir n8n && \
			chown -R root ./n8n && \
			git clone --depth 1 --branch "n8n@"${N8N_VERSION} https://github.com/n8n-io/n8n n8n
		WORKDIR n8n

#	#### OVERRIDING N8N FILES TO CUSTOMIZED ONES ####
#		RUN \
#			rm ./packages/cli/src/Server.ts ./packages/cli/src/Logger.ts ./packages/cli/src/credentials/credentials.controller.ts ./packages/cli/src/PublicApi/v1/handlers/workflows/spec/schemas/workflowSettings.yml ./packages/cli/src/WorkflowExecuteAdditionalData.ts
#		COPY \
#			wrapper/packages/cli/src/Server.ts ./packages/cli/src/Server.ts
#		COPY \
#			wrapper/packages/cli/src/PublicApi/v1/handlers/workflows/spec/schemas/workflowSettings.yml ./packages/cli/src/PublicApi/v1/handlers/workflows/spec/schemas/workflowSettings.yml
#		COPY \
#			wrapper/packages/cli/src/Logger.ts ./packages/cli/src/Logger.ts
#		COPY \
#			wrapper/packages/cli/src/credentials/credentials.controller.ts ./packages/cli/src/credentials/credentials.controller.ts
#		COPY \
#			wrapper/packages/cli/src/WorkflowExecuteAdditionalData.ts ./packages/cli/src/WorkflowExecuteAdditionalData.ts

	#### INSTALL AND ENABLE COREPACK AND ACTIVATE PNPM FOR BUILD MAKING ####
		RUN \
			npm install -g corepack && \
			corepack enable && \
			corepack prepare pnpm@latest --activate
		# RUN pnpm add @prisma/client -w
		RUN pnpm add dd-trace -w
		# RUN	node --require dd-trace/init app.js

	#### CREATING N8N BUILD ####
		RUN \
			npm_config_user=root && \
			pnpm install && \
			pnpm build

	ENV \
		NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
	RUN export NODE_OPTIONS=--max_old_space_size=8192


	#### __DATABASE CONFIGURATIONS__  ####

		ARG DB_TYPE
		ENV DB_TYPE=${DB_TYPE}
		ARG DB_POSTGRESDB_PORT
		ENV DB_POSTGRESDB_PORT=${DB_POSTGRESDB_PORT}
		ARG DB_POSTGRESDB_HOST
		ENV DB_POSTGRESDB_HOST=${DB_POSTGRESDB_HOST}
		ARG DB_POSTGRESDB_USER
		ENV DB_POSTGRESDB_USER=${DB_POSTGRESDB_USER}
		ARG DB_POSTGRESDB_PASSWORD
		ENV DB_POSTGRESDB_PASSWORD=${DB_POSTGRESDB_PASSWORD}

	####  __APP CONFIGURATIONS__  ####

		ARG N8N_PORT
		ENV N8N_PORT=${N8N_PORT}
		ARG GENERIC_TIMEZONE
		ENV GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
		ARG EXECUTIONS_DATA_MAX_AGE
		ENV EXECUTIONS_DATA_MAX_AGE=${EXECUTIONS_DATA_MAX_AGE}

	####  __SMTP CONFIGURATIONS__ ####

		ARG N8N_SMTP_HOST
		ENV N8N_SMTP_HOST=${N8N_SMTP_HOST}
		ARG N8N_SMTP_PORT
		ENV N8N_SMTP_PORT=${N8N_SMTP_PORT}
		ARG N8N_SMTP_USER
		ENV N8N_SMTP_USER=${N8N_SMTP_USER}
		ARG N8N_SMTP_PASS
		ENV N8N_SMTP_PASS=${N8N_SMTP_PASS}
		ARG N8N_SMTP_SSL
		ENV N8N_SMTP_SSL=${N8N_SMTP_SSL}
		ENV N8N_EMAIL_MODE=smtp

	#### __N8N LOGGER CONFIGURATIONS__ ####
		ARG N8N_LOG_LEVEL
		ENV N8N_LOG_LEVEL=${N8N_LOG_LEVEL}
		ARG N8N_LOG_OUTPUT
		ENV N8N_LOG_OUTPUT=${N8N_LOG_OUTPUT}
		ARG N8N_LOG_FILE_LOCATION
		ENV N8N_LOG_FILE_LOCATION=${N8N_LOG_FILE_LOCATION}
		ARG N8N_LOG_FILE_MAXSIZE
		ENV N8N_LOG_FILE_MAXSIZE=${N8N_LOG_FILE_MAXSIZE}
		ARG N8N_LOG_FILE_MAXCOUNT
		ENV N8N_LOG_FILE_MAXCOUNT=${N8N_LOG_FILE_MAXCOUNT}

	#### __N8N TELEMETRY CONFIGURATIONS__ ####
		ARG N8N_DIAGNOSTICS_ENABLED
		ENV N8N_DIAGNOSTICS_ENABLED=${N8N_DIAGNOSTICS_ENABLED}
		ARG N8N_VERSION_NOTIFICATIONS_ENABLED
		ENV N8N_VERSION_NOTIFICATIONS_ENABLED=${N8N_VERSION_NOTIFICATIONS_ENABLED}

	####  SETTING DOCKER ENTRYPOINT ####
		COPY \
			wrapper/docker/docker-entrypoint.sh /docker-entrypoint.sh

		RUN \
			chmod +x /docker-entrypoint.sh

		ENTRYPOINT \
			["/docker-entrypoint.sh"]

any suggest to handle it.

Hey @Gouravdev,

I would compare it against we do in our own custom image example here: n8n/docker/images/n8n-custom/Dockerfile at master · n8n-io/n8n · GitHub this may help you work out what has gone wrong.

Can you please help me in the current file, I have shared. what changes I need to do it.
Thanks

Hey @Gouravdev,

I would recommend trying the example we provide, It looks like for you the failure is on the build so assuming you are not making any file changes it should just work.

If I get a chance I will take a look at your Dockerfile but I don’t know when I will be able to get a chance to look.

@Jon I have followed what you suggested but still getting this

9.754 • Packages in scope: @n8n/chat, @n8n/client-oauth2, @n8n/n8n-nodes-langchain, @n8n/permissions, @n8n_io/eslint-config, n8n, n8n-core, n8n-design-system, n8n-editor-ui, n8n-node-dev, n8n-nodes-base, n8n-workflow
9.754 • Running build in 12 packages
9.754 • Remote caching disabled
9.757 @n8n/permissions:build: cache miss, executing ea8a6efeffbd675a
9.758 @n8n/client-oauth2:build: cache miss, executing ffd937db8ed40701
9.762 n8n-workflow:build: cache miss, executing bded664a46a5054f
9.767 n8n-design-system:build: cache miss, executing 82682d5fc0f4a9c4
10.49 @n8n/client-oauth2:build: 
10.49 @n8n/client-oauth2:build: > @n8n/[email protected] build /n8n/packages/@n8n/client-oauth2
10.49 @n8n/client-oauth2:build: > tsc -p tsconfig.build.json
10.49 @n8n/client-oauth2:build: 
10.50 n8n-workflow:build: 
10.50 n8n-workflow:build: > [email protected] build /n8n/packages/workflow
10.50 n8n-workflow:build: > tsc -p tsconfig.build.json
10.50 n8n-workflow:build: 
10.51 n8n-design-system:build: 
10.51 n8n-design-system:build: > [email protected] build /n8n/packages/design-system
10.51 n8n-design-system:build: > vite build
10.51 n8n-design-system:build: 
10.53 @n8n/permissions:build: 
10.53 @n8n/permissions:build: > @n8n/[email protected] build /n8n/packages/@n8n/permissions
10.53 @n8n/permissions:build: > tsc -p tsconfig.build.json
10.53 @n8n/permissions:build: 
10.93 n8n-design-system:build: Segmentation fault
10.96 n8n-design-system:build:  ELIFECYCLE  Command failed with exit code 139.
10.99 n8n-design-system:build: ERROR: command finished with error: command (/n8n/packages/design-system) pnpm run build exited (1)
11.00 @n8n/client-oauth2:build:  ELIFECYCLE  Command failed.
11.00 n8n-workflow:build:  ELIFECYCLE  Command failed.
11.00 @n8n/permissions:build:  ELIFECYCLE  Command failed.
11.00 @n8n/permissions:build:  WARN   Local package.json exists, but node_modules missing, did you mean to install?
11.02 
11.02  Tasks:    0 successful, 4 total
11.02 n8n-design-system#build: command (/n8n/packages/design-system) pnpm run build exited (1)
11.02  ERROR  run failed: command  exited (1)
11.02 Cached:    0 cached, 4 total
11.02   Time:    2.505s 
11.02 Failed:    n8n-design-system#build
11.02 
11.03  ELIFECYCLE  Command failed with exit code 1.
------
failed to solve: process "/bin/sh -c npm_config_user=root && \t\t\tpnpm install && \t\t\tpnpm build" did not complete successfully: exit code: 1

Hey @Gouravdev,

Can you share the dockerfile you are using now and the command you are using to build it?

same from above, docker compose up -d --build

Hey @Gouravdev,

So to confirm you are using the example we provide and when running the docker compose file it is failing with the same error?

Can you also share your docker compose file?

version: '3.2'

services:

  pgadmin:
    image: dpage/pgadmin4:latest
    container_name: n8n_pgadmin
    restart: always
    environment:
      - PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL}
      - PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
    ports:
      - "8087:80"

  postgres:
    image: postgres:latest
    container_name: n8n_postgres
    restart: always
    environment:
      - POSTGRES_DB=${DATABASE_DB}
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
    volumes:
      - './pg_data:/var/lib/postgresql/data'

  n8n:
    container_name: n8n_app
    build:
      context: .
      dockerfile: Dockerfile-n8n
      args:
        - N8N_VERSION=1.22.6
        - DB_TYPE=postgresdb
        - DB_POSTGRESDB_DATABASE=${DATABASE_DB}
        - DB_POSTGRESDB_USER=${DATABASE_USER}
        - DB_POSTGRESDB_HOST=${DATABASE_HOST}
        - DB_POSTGRESDB_PORT=${DATABASE_PORT}
        - DB_POSTGRESDB_PASSWORD=${DATABASE_PASSWORD}
        - N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}
        - N8N_PORT=5678
        - N8N_SMTP_HOST=${N8N_SMTP_HOST}
        - N8N_SMTP_PORT=${N8N_SMTP_PORT}
        - N8N_SMTP_USER=${N8N_SMTP_USER}
        - N8N_SMTP_PASS=${N8N_SMTP_PASS}
        - N8N_SMTP_SSL=${N8N_SMTP_SSL}
        - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
        - EXECUTIONS_DATA_MAX_AGE=${EXECUTIONS_DATA_MAX_AGE}
        - N8N_LOG_LEVEL=${N8N_LOG_LEVEL}
        - N8N_LOG_OUTPUT=${N8N_LOG_OUTPUT}
        - N8N_LOG_FILE_LOCATION=${N8N_LOG_FILE_LOCATION}
        - N8N_LOG_FILE_MAXSIZE=${N8N_LOG_FILE_MAXSIZE}
        - N8N_LOG_FILE_MAXCOUNT=${N8N_LOG_FILE_MAXCOUNT}
        - N8N_DIAGNOSTICS_ENABLED=${N8N_DIAGNOSTICS_ENABLED}
        - N8N_VERSION_NOTIFICATIONS_ENABLED=${N8N_VERSION_NOTIFICATIONS_ENABLED}
    restart: always
    command: /docker-entrypoint.sh
    environment:
      - EXECUTIONS_TIMEOUT=19800
      - EXECUTIONS_TIMEOUT_MAX=19800
      - EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=true
      - EXECUTIONS_DATA_PRUNE=true
      # - EXECUTIONS_DATA_PRUNE_MAX_COUNT=5000
    ports:
      - "5678:5678"
    healthcheck:
      test: [ 'CMD-SHELL', 'pg_isready -h localhost -U postgres -d ${DATABASE_DB}' ]
      interval: 5s
      timeout: 5s
      retries: 10
    depends_on:
      - postgres

@Jon
which dpage/pgadmin4 version and postgres version is compatible with n8n 1.22.6

Hey @Gouravdev,

PGAdmin is unrelated to n8n as we don’t need to to run, When it comes to Postgres I have seen version 11 to 15 being used but I would imagine 16 wouldn’t be a problem.

I don’t know why your compose has /docker-entrypoint.sh as a command but we can worry about that later, I take it Dockerfile-n8n is also…

ARG NODE_VERSION=18

# 1. Create an image to build n8n
FROM --platform=linux/amd64 n8nio/base:${NODE_VERSION} as builder

# Build the application from source
WORKDIR /src
COPY . /src
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store --mount=type=cache,id=pnpm-metadata,target=/root/.cache/pnpm/metadata pnpm install --frozen-lockfile
RUN pnpm build

# Delete all dev dependencies
RUN jq 'del(.pnpm.patchedDependencies)' package.json > package.json.tmp; mv package.json.tmp package.json
RUN node scripts/trim-fe-packageJson.js

# Delete any source code, source-mapping, or typings
RUN find . -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" -o -name "tsconfig.json" -o -name "*.tsbuildinfo" | xargs rm -rf

# Deploy the `n8n` package into /compiled
RUN mkdir /compiled
RUN NODE_ENV=production pnpm --filter=n8n --prod --no-optional deploy /compiled

# 2. Start with a new clean image with just the code that is needed to run n8n
FROM n8nio/base:${NODE_VERSION}
ENV NODE_ENV=production

ARG N8N_RELEASE_TYPE=dev
ENV N8N_RELEASE_TYPE=${N8N_RELEASE_TYPE}

WORKDIR /home/node
COPY --from=builder /compiled /usr/local/lib/node_modules/n8n
COPY docker/images/n8n/docker-entrypoint.sh /

RUN \
	pnpm rebuild --dir /usr/local/lib/node_modules/n8n sqlite3 && \
	ln -s /usr/local/lib/node_modules/n8n/bin/n8n /usr/local/bin/n8n && \
	mkdir .n8n && \
	chown node:node .n8n

USER node
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

And not the previously provided file as well.

The above error is coming for the MAC OS above macOS version 13.6,

Can you answer the question on the file please so I can test this?

Jon the file you have shared is not working for macOS Sonoma version 14.3

Hey @Gouravdev,

I have just tested the file I shared which came directly from our GitHub repo with the command we recommend docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile . and I can confirm that it works with no issues.

I can see no reason why the compose file would change how the build works, Can you share the full output when you try the build using the file I provided?

Jon, I have made the modification as per my requirement.
Can you please check these files on your system and let me know the changes you suggest.
docker-compose.yml
``