[GH-ISSUE #3146] [bug]: Error while doing docker compose build #1037

Closed
opened 2026-03-16 18:14:10 +03:00 by kerem · 3 comments
Owner

Originally created by @the-Shallow on GitHub (Jun 17, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3146

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

`PS E:\hoppscotch> docker compose build
[+] Building 681.6s (36/39)
=> [hoppscotch-backend internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 558B 0.0s
=> [hoppscotch-backend internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [hoppscotch-backend internal] load metadata for docker.io/library/node:18.8.0 2.9s
=> [hoppscotch-backend builder 1/9] FROM docker.io/library/node:18.8.0@sha256:a0a2fc4435b0c9ae7bec0a69b1279323a4a41c5a005581fbf30d39cd5777db3 0.0s
=> [hoppscotch-backend internal] load build context 0.9s
=> => transferring context: 34.81MB 0.8s
=> CACHED [hoppscotch-backend builder 2/9] WORKDIR /usr/src/app 0.0s
=> CACHED [hoppscotch-backend builder 3/9] RUN npm i -g pnpm 0.0s
=> [hoppscotch-backend builder 4/9] COPY .env . 0.2s
=> [hoppscotch-backend builder 5/9] COPY pnpm-lock.yaml . 0.1s
=> [hoppscotch-backend builder 6/9] RUN pnpm fetch 172.1s
=> [hoppscotch-backend builder 7/9] COPY ./packages/hoppscotch-backend . 0.6s
=> [hoppscotch-backend builder 8/9] RUN pnpm i --filter hoppscotch-backend 111.3s
=> [hoppscotch-backend builder 9/9] RUN pnpm exec prisma generate 9.8s
=> [hoppscotch-backend] exporting to image 101.5s
=> => exporting layers 101.5s
=> => writing image sha256:2c35ccd2954fd8b6f76790eca85507f7ec62e48601e8b9e5352d6d596dea0fcb 0.0s
=> => naming to docker.io/library/hoppscotch-hoppscotch-backend 0.0s
=> [hoppscotch-sh-admin internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 505B 0.0s
=> [hoppscotch-sh-admin internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [hoppscotch-app internal] load metadata for docker.io/library/caddy:2-alpine 3.0s
=> [hoppscotch-app internal] load metadata for docker.io/library/node:lts 2.6s
=> [hoppscotch-app stage-1 1/4] FROM docker.io/library/caddy:2-alpine@sha256:993f27cb24190f8b714f6ffd0cd487281b48b64a70d6575be8eee18b6c2b02af 0.2s
=> => resolve docker.io/library/caddy:2-alpine@sha256:993f27cb24190f8b714f6ffd0cd487281b48b64a70d6575be8eee18b6c2b02af 0.1s
=> [hoppscotch-app builder 1/7] FROM docker.io/library/node:lts@sha256:4a55308cc855cba1a925d19ae4e45838741dad2fd7bb8949a93b2a0f2ae339e3 0.0s
=> [hoppscotch-sh-admin internal] load build context 87.4s
=> => transferring context: 1.28GB 85.9s
=> [hoppscotch-app internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [hoppscotch-app internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 517B 0.0s
=> [hoppscotch-app internal] load build context 87.9s
=> => transferring context: 196.82MB 83.0s
=> CACHED [hoppscotch-sh-admin stage-1 2/4] WORKDIR /site 0.0s
=> CACHED [hoppscotch-sh-admin stage-1 3/4] COPY packages/hoppscotch-sh-admin/Caddyfile /etc/caddy/Caddyfile 0.0s
=> CACHED [hoppscotch-app builder 2/7] WORKDIR /usr/src/app 0.0s
=> CACHED [hoppscotch-app builder 3/7] RUN npm i -g pnpm 0.0s
=> [hoppscotch-sh-admin builder 4/7] COPY . . 174.6s
=> [hoppscotch-sh-admin builder 5/7] RUN pnpm install 10.3s
=> [hoppscotch-sh-admin builder 6/7] WORKDIR /usr/src/app/packages/hoppscotch-sh-admin/ 0.1s
=> CACHED [hoppscotch-app builder 4/7] COPY . . 0.0s
=> CACHED [hoppscotch-app builder 5/7] RUN pnpm install 0.0s
=> [hoppscotch-app builder 6/7] WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web/ 0.1s
=> ERROR [hoppscotch-app builder 7/7] RUN pnpm run build 4.6s
=> ERROR [hoppscotch-sh-admin builder 7/7] RUN pnpm run build 4.6s

[hoppscotch-app builder 7/7] RUN pnpm run build:
#0 4.089
#0 4.089 > @hoppscotch/selfhost-web@2023.4.6 build /usr/src/app/packages/hoppscotch-selfhost-web
#0 4.089 > node --max_old_space_size=16384 ./node_modules/vite/bin/vite.js build
#0 4.089
#0 4.324 node:internal/modules/cjs/loader:1078
#0 4.324 throw err;
#0 4.324 ^
#0 4.324
#0 4.324 Error: Cannot find module '/usr/src/app/packages/hoppscotch-selfhost-web/node_modules/vite/bin/vite.js'
#0 4.324 at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
#0 4.324 at Module._load (node:internal/modules/cjs/loader:920:27)
#0 4.324 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
#0 4.324 at node:internal/main/run_main_module:23:47 {
#0 4.324 code: 'MODULE_NOT_FOUND',
#0 4.324 requireStack: []
#0 4.324 }
#0 4.324
#0 4.324 Node.js v18.16.0
#0 4.351  ELIFECYCLE  Command failed with exit code 1.



[hoppscotch-sh-admin builder 7/7] RUN pnpm run build:
#0 4.084
#0 4.084 > hoppscotch-sh-admin@2023.4.6 build /usr/src/app/packages/hoppscotch-sh-admin
#0 4.084 > vite build
#0 4.084
#0 4.477 node:internal/errors:490
#0 4.477 ErrorCaptureStackTrace(err);
#0 4.477 ^
#0 4.477
#0 4.477 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /usr/src/app/node_modules/.pnpm/vite@3.2.4_@types+node@17.0.45_sass@1.53.0_terser@5.14.1/node_modules/vite/dist/node/cli.js
#0 4.477 at new NodeError (node:internal/errors:399:5)
#0 4.477 at packageResolve (node:internal/modules/esm/resolve:889:9)
#0 4.477 at moduleResolve (node:internal/modules/esm/resolve:938:20)
#0 4.477 at defaultResolve (node:internal/modules/esm/resolve:1153:11)
#0 4.477 at nextResolve (node:internal/modules/esm/loader:163:28)
#0 4.477 at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
#0 4.477 at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
#0 4.477 at ModuleWrap. (node:internal/modules/esm/module_job:77:40)
#0 4.477 at link (node:internal/modules/esm/module_job:76:36) {
#0 4.477 code: 'ERR_MODULE_NOT_FOUND'
#0 4.477 }
#0 4.477
#0 4.477 Node.js v18.16.0
#0 4.497  ELIFECYCLE  Command failed with exit code 1.


failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1`

Steps to reproduce

  1. git clone
  2. configure .env file
  3. install dependencies
  4. run command docker compose build

Environment

Production

Version

Local

Originally created by @the-Shallow on GitHub (Jun 17, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3146 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior `PS E:\hoppscotch> docker compose build [+] Building 681.6s (36/39) => [hoppscotch-backend internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 558B 0.0s => [hoppscotch-backend internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [hoppscotch-backend internal] load metadata for docker.io/library/node:18.8.0 2.9s => [hoppscotch-backend builder 1/9] FROM docker.io/library/node:18.8.0@sha256:a0a2fc4435b0c9ae7bec0a69b1279323a4a41c5a005581fbf30d39cd5777db3 0.0s => [hoppscotch-backend internal] load build context 0.9s => => transferring context: 34.81MB 0.8s => CACHED [hoppscotch-backend builder 2/9] WORKDIR /usr/src/app 0.0s => CACHED [hoppscotch-backend builder 3/9] RUN npm i -g pnpm 0.0s => [hoppscotch-backend builder 4/9] COPY .env . 0.2s => [hoppscotch-backend builder 5/9] COPY pnpm-lock.yaml . 0.1s => [hoppscotch-backend builder 6/9] RUN pnpm fetch 172.1s => [hoppscotch-backend builder 7/9] COPY ./packages/hoppscotch-backend . 0.6s => [hoppscotch-backend builder 8/9] RUN pnpm i --filter hoppscotch-backend 111.3s => [hoppscotch-backend builder 9/9] RUN pnpm exec prisma generate 9.8s => [hoppscotch-backend] exporting to image 101.5s => => exporting layers 101.5s => => writing image sha256:2c35ccd2954fd8b6f76790eca85507f7ec62e48601e8b9e5352d6d596dea0fcb 0.0s => => naming to docker.io/library/hoppscotch-hoppscotch-backend 0.0s => [hoppscotch-sh-admin internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 505B 0.0s => [hoppscotch-sh-admin internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [hoppscotch-app internal] load metadata for docker.io/library/caddy:2-alpine 3.0s => [hoppscotch-app internal] load metadata for docker.io/library/node:lts 2.6s => [hoppscotch-app stage-1 1/4] FROM docker.io/library/caddy:2-alpine@sha256:993f27cb24190f8b714f6ffd0cd487281b48b64a70d6575be8eee18b6c2b02af 0.2s => => resolve docker.io/library/caddy:2-alpine@sha256:993f27cb24190f8b714f6ffd0cd487281b48b64a70d6575be8eee18b6c2b02af 0.1s => [hoppscotch-app builder 1/7] FROM docker.io/library/node:lts@sha256:4a55308cc855cba1a925d19ae4e45838741dad2fd7bb8949a93b2a0f2ae339e3 0.0s => [hoppscotch-sh-admin internal] load build context 87.4s => => transferring context: 1.28GB 85.9s => [hoppscotch-app internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [hoppscotch-app internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 517B 0.0s => [hoppscotch-app internal] load build context 87.9s => => transferring context: 196.82MB 83.0s => CACHED [hoppscotch-sh-admin stage-1 2/4] WORKDIR /site 0.0s => CACHED [hoppscotch-sh-admin stage-1 3/4] COPY packages/hoppscotch-sh-admin/Caddyfile /etc/caddy/Caddyfile 0.0s => CACHED [hoppscotch-app builder 2/7] WORKDIR /usr/src/app 0.0s => CACHED [hoppscotch-app builder 3/7] RUN npm i -g pnpm 0.0s => [hoppscotch-sh-admin builder 4/7] COPY . . 174.6s => [hoppscotch-sh-admin builder 5/7] RUN pnpm install 10.3s => [hoppscotch-sh-admin builder 6/7] WORKDIR /usr/src/app/packages/hoppscotch-sh-admin/ 0.1s => CACHED [hoppscotch-app builder 4/7] COPY . . 0.0s => CACHED [hoppscotch-app builder 5/7] RUN pnpm install 0.0s => [hoppscotch-app builder 6/7] WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web/ 0.1s => ERROR [hoppscotch-app builder 7/7] RUN pnpm run build 4.6s => ERROR [hoppscotch-sh-admin builder 7/7] RUN pnpm run build 4.6s ------ > [hoppscotch-app builder 7/7] RUN pnpm run build: #0 4.089 #0 4.089 > @hoppscotch/selfhost-web@2023.4.6 build /usr/src/app/packages/hoppscotch-selfhost-web #0 4.089 > node --max_old_space_size=16384 ./node_modules/vite/bin/vite.js build #0 4.089 #0 4.324 node:internal/modules/cjs/loader:1078 #0 4.324 throw err; #0 4.324 ^ #0 4.324 #0 4.324 Error: Cannot find module '/usr/src/app/packages/hoppscotch-selfhost-web/node_modules/vite/bin/vite.js' #0 4.324 at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) #0 4.324 at Module._load (node:internal/modules/cjs/loader:920:27) #0 4.324 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) #0 4.324 at node:internal/main/run_main_module:23:47 { #0 4.324 code: 'MODULE_NOT_FOUND', #0 4.324 requireStack: [] #0 4.324 } #0 4.324 #0 4.324 Node.js v18.16.0 #0 4.351  ELIFECYCLE  Command failed with exit code 1. ------ ------ > [hoppscotch-sh-admin builder 7/7] RUN pnpm run build: #0 4.084 #0 4.084 > hoppscotch-sh-admin@2023.4.6 build /usr/src/app/packages/hoppscotch-sh-admin #0 4.084 > vite build #0 4.084 #0 4.477 node:internal/errors:490 #0 4.477 ErrorCaptureStackTrace(err); #0 4.477 ^ #0 4.477 #0 4.477 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /usr/src/app/node_modules/.pnpm/vite@3.2.4_@types+node@17.0.45_sass@1.53.0_terser@5.14.1/node_modules/vite/dist/node/cli.js #0 4.477 at new NodeError (node:internal/errors:399:5) #0 4.477 at packageResolve (node:internal/modules/esm/resolve:889:9) #0 4.477 at moduleResolve (node:internal/modules/esm/resolve:938:20) #0 4.477 at defaultResolve (node:internal/modules/esm/resolve:1153:11) #0 4.477 at nextResolve (node:internal/modules/esm/loader:163:28) #0 4.477 at ESMLoader.resolve (node:internal/modules/esm/loader:838:30) #0 4.477 at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) #0 4.477 at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40) #0 4.477 at link (node:internal/modules/esm/module_job:76:36) { #0 4.477 code: 'ERR_MODULE_NOT_FOUND' #0 4.477 } #0 4.477 #0 4.477 Node.js v18.16.0 #0 4.497  ELIFECYCLE  Command failed with exit code 1. ------ failed to solve: process "/bin/sh -c pnpm run build" did not complete successfully: exit code: 1` ### Steps to reproduce 1. git clone 2. configure .env file 3. install dependencies 4. run command docker compose build ### Environment Production ### Version Local
kerem 2026-03-16 18:14:10 +03:00
Author
Owner

@NicklasWallgren commented on GitHub (Jun 17, 2023):

@the-Shallow You'll need to increase the memory usage of Docker Desktop VM to at least 6 GB (from the default 2GB) and reduce the max heap size of Node v8 from 16GB to 4GB, see my PR https://github.com/hoppscotch/hoppscotch/pull/3148.

<!-- gh-comment-id:1595649356 --> @NicklasWallgren commented on GitHub (Jun 17, 2023): @the-Shallow You'll need to increase the memory usage of Docker Desktop VM to at least 6 GB (from the default 2GB) and reduce the max heap size of Node v8 from 16GB to 4GB, see my PR https://github.com/hoppscotch/hoppscotch/pull/3148.
Author
Owner

@NicklasWallgren commented on GitHub (Jun 17, 2023):

Similar issue https://github.com/hoppscotch/hoppscotch/issues/3036

<!-- gh-comment-id:1595650842 --> @NicklasWallgren commented on GitHub (Jun 17, 2023): Similar issue https://github.com/hoppscotch/hoppscotch/issues/3036
Author
Owner

@AndrewBastin commented on GitHub (Sep 6, 2023):

Closing due to inactivity, please do reopen if this issue persists in the 2023.8.0 images.

<!-- gh-comment-id:1708663589 --> @AndrewBastin commented on GitHub (Sep 6, 2023): Closing due to inactivity, please do reopen if this issue persists in the 2023.8.0 images.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1037
No description provided.