Closed sjdonado closed 10 months ago
Temp fix
FROM oven/bun:1-alpine AS base
WORKDIR /usr/src/app
RUN apk update && apk add nodejs npm
FROM base as install
COPY package.json .
RUN npm install
FROM install AS prerelease
ENV NODE_ENV=production
COPY --from=install /usr/src/app/node_modules node_modules
ADD . .
RUN bun run build
FROM base AS release
ENV NODE_ENV=production
COPY --from=prerelease /usr/src/app .
EXPOSE 3000/tcp
CMD ["bun", "run", "start"]
Can confirm this issue. My temporary fix was to specify bun:1.0.16
Receiving a similar issue with @swc/core
:
[Container] 2023/12/13 17:08:32.527158 Running command bun install
--
47 | bun install v1.0.17 (5e60861c)
48 | node:internal/modules/cjs/loader:1031
49 | throw err;
50 | ^
51 |
52 | Error: Cannot find module '/codebuild/output/src1106935630/src/postinstall.js'
53 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
54 | at Function.Module._load (node:internal/modules/cjs/loader:873:27)
55 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
56 | at node:internal/main/run_main_module:22:47 {
57 | code: 'MODULE_NOT_FOUND',
58 | requireStack: []
59 | }
60 |
61 | error: postinstall script from "@swc/core" exited with code 1 (SIGHUP)
Similar issue with @apollo/protobufjs postinstall:
Sending build context to Docker daemon 599kB
Step 1/21 : FROM oven/bun:1.0.17-alpine as base
1.0.17-alpine: Pulling from oven/bun
c926b61bad3b: Already exists
3a67a0778a93: Already exists
110f7de42b09: Already exists
0e9c81430310: Already exists
1c5d9b048f10: Already exists
21c1038c373a: Already exists
7ae05b609104: Already exists
Digest: sha256:ca62786f91fdc53f5bc0a5e4e4dd2ac6f956f601af8b5f1c1cdb1706ebfb1cce
Status: Downloaded newer image for oven/bun:1.0.17-alpine
---> 28621cfabe11
Step 2/21 : WORKDIR /usr/src/app
---> Running in b666f81846c7
Removing intermediate container b666f81846c7
---> ae604d87785e
Step 3/21 : FROM base AS install
---> ae604d87785e
Step 4/21 : RUN mkdir -p /temp/dev
---> Running in 1eeb8dba4451
Removing intermediate container 1eeb8dba4451
---> a836c5c6c8ef
Step 5/21 : COPY . /temp/dev/
---> 6db2e65e0b68
Step 6/21 : RUN cd /temp/dev && bun install --frozen-lockfile
---> Running in f402d5112eb4
[0.03ms] ".env"
bun install v1.0.17 (5e60861c)
error: script not found "scripts/postinstall"
error: postinstall script from "@apollo/protobufjs" exited with code 1 (SIGHUP)
For now I am just going back to 1.0.16
Similar issue with @apollo/protobufjs postinstall:
Sending build context to Docker daemon 599kB Step 1/21 : FROM oven/bun:1.0.17-alpine as base 1.0.17-alpine: Pulling from oven/bun c926b61bad3b: Already exists 3a67a0778a93: Already exists 110f7de42b09: Already exists 0e9c81430310: Already exists 1c5d9b048f10: Already exists 21c1038c373a: Already exists 7ae05b609104: Already exists Digest: sha256:ca62786f91fdc53f5bc0a5e4e4dd2ac6f956f601af8b5f1c1cdb1706ebfb1cce Status: Downloaded newer image for oven/bun:1.0.17-alpine ---> 28621cfabe11 Step 2/21 : WORKDIR /usr/src/app ---> Running in b666f81846c7 Removing intermediate container b666f81846c7 ---> ae604d87785e Step 3/21 : FROM base AS install ---> ae604d87785e Step 4/21 : RUN mkdir -p /temp/dev ---> Running in 1eeb8dba4451 Removing intermediate container 1eeb8dba4451 ---> a836c5c6c8ef Step 5/21 : COPY . /temp/dev/ ---> 6db2e65e0b68 Step 6/21 : RUN cd /temp/dev && bun install --frozen-lockfile ---> Running in f402d5112eb4 [0.03ms] ".env" bun install v1.0.17 (5e60861c) error: script not found "scripts/postinstall" error: postinstall script from "@apollo/protobufjs" exited with code 1 (SIGHUP)
For now I am just going back to 1.0.16
I'm having this exact issue.
Awesome yeah i can confirm this one is now working for me with v18 :dancers:
Still buggy for me, i got this
[+] Building 26.1s (8/12) docker:colima
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 443B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 108B 0.0s
=> [internal] load metadata for docker.io/oven/bun:1-alpine 1.2s
=> [internal] load build context 0.0s
=> => transferring context: 1.55MB 0.0s
=> [base 1/2] FROM docker.io/oven/bun:1-alpine@sha256:f5067895ea6e81362fbcf8481d9f8f2cab5ca1fd2c4924eec5ecc75a1efda89b 9.5s
=> => resolve docker.io/oven/bun:1-alpine@sha256:f5067895ea6e81362fbcf8481d9f8f2cab5ca1fd2c4924eec5ecc75a1efda89b 0.0s
=> => sha256:ab108295191d31a7ba4bf02251449d2d036d347faf7c73d1c1587530b4d86200 1.68kB / 1.68kB 0.0s
=> => sha256:2499bbe5831ff871704c5b50bd28915c839e85f395f0c2f12af3df2ae5cd4670 3.62kB / 3.62kB 0.0s
=> => sha256:2c03dbb20264f09924f9eab176da44e5421e74a78b09531d3c63448a7baa7c59 3.33MB / 3.33MB 0.8s
=> => sha256:4fd116a52c53f75301795babb831a7d00bb293ec058d135a651aa4e33fe844e5 906.27kB / 906.27kB 1.0s
=> => sha256:f5067895ea6e81362fbcf8481d9f8f2cab5ca1fd2c4924eec5ecc75a1efda89b 685B / 685B 0.0s
=> => sha256:86d0ff57b65ca4439e55096f87a412af04e6e2255d1dad295897aae4e4f9c904 5.61MB / 5.61MB 1.9s
=> => sha256:13c18312a5b30e189a8e19793a91309e7f3270c634e6408ce8eb24d231423794 34.11MB / 34.11MB 8.7s
=> => extracting sha256:2c03dbb20264f09924f9eab176da44e5421e74a78b09531d3c63448a7baa7c59 0.1s
=> => sha256:db097f2255358e4e6b36bc9ad2590db0e02f4d8371c36a274d1d43fdceb8dbcc 295B / 295B 1.5s
=> => sha256:d4b4c10fcb46fb4f0beae0cf8c37487908ae9446545d39db4e9e39aa60dae6bf 6.63MB / 6.63MB 4.7s
=> => extracting sha256:86d0ff57b65ca4439e55096f87a412af04e6e2255d1dad295897aae4e4f9c904 0.1s
=> => extracting sha256:4fd116a52c53f75301795babb831a7d00bb293ec058d135a651aa4e33fe844e5 0.0s
=> => sha256:ecad3b9faaba88d21e931e5633685cb307e2a689ae41a6cfd36317b95c84f103 145B / 145B 2.6s
=> => extracting sha256:13c18312a5b30e189a8e19793a91309e7f3270c634e6408ce8eb24d231423794 0.5s
=> => extracting sha256:db097f2255358e4e6b36bc9ad2590db0e02f4d8371c36a274d1d43fdceb8dbcc 0.0s
=> => extracting sha256:d4b4c10fcb46fb4f0beae0cf8c37487908ae9446545d39db4e9e39aa60dae6bf 0.1s
=> => extracting sha256:ecad3b9faaba88d21e931e5633685cb307e2a689ae41a6cfd36317b95c84f103 0.0s
=> [base 2/2] WORKDIR /usr/src/app 0.0s
=> [install 1/2] COPY package.json bun.lockb . 0.0s
=> ERROR [install 2/2] RUN bun install --frozen-lockfile 15.4s
------
> [install 2/2] RUN bun install --frozen-lockfile:
0.146 bun install v1.0.18 (36c316a2)
15.28 error: Module not found "/usr/src/app/install.js"
15.28
15.28 error: postinstall script from "esbuild" exited with code 1 (SIGHUP)
------
Dockerfile:6
--------------------
4 | FROM base as install
5 | COPY package.json bun.lockb .
6 | >>> RUN bun install --frozen-lockfile
7 |
8 | FROM install AS prerelease
--------------------
ERROR: failed to solve: process "/bin/sh -c bun install --frozen-lockfile" did not complete successfully: exit code: 1
I have the same problem. I think it's the same issue as in #7626. The postinstall script is being run from the wrong folder. It works fine in v1.0.16
Edit: I think it's related to #7517 aswell.
Also getting this with SIGKILL in GitLab CI. Anything I can do to provide more details?
Using docker image sha256:0cec42f07333c446df69643cdd3e6b7ae531240d86d9bab3c8f20f99f95d9006 for oven/bun:1.1.17 with digest oven/bun@sha256:7b5c05b562efbbec704df426a9eef18f3b935bdc868678895a935bf120bda062 ...
$ bun install --concurrent-scripts=1
bun install v1.1.17 (bb66bba1)
Resolving dependencies
Resolved, downloaded and extracted [2]
error: postinstall script from "esbuild" terminated by SIGKILL (Forced quit)
/bin/bash: line 150: 15 Killed bun install --concurrent-scripts=1
Receiving a similar issue with
@swc/core
:[Container] 2023/12/13 17:08:32.527158 Running command bun install -- 47 | bun install v1.0.17 (5e60861c) 48 | node:internal/modules/cjs/loader:1031 49 | throw err; 50 | ^ 51 | 52 | Error: Cannot find module '/codebuild/output/src1106935630/src/postinstall.js' 53 | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15) 54 | at Function.Module._load (node:internal/modules/cjs/loader:873:27) 55 | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) 56 | at node:internal/main/run_main_module:22:47 { 57 | code: 'MODULE_NOT_FOUND', 58 | requireStack: [] 59 | } 60 | 61 | error: postinstall script from "@swc/core" exited with code 1 (SIGHUP)
using bun update
at first.
> bun update
> bun install
What version of Bun is running?
v1.0.17
What platform is your computer?
Docker oven/bun:1-alpine
What steps can reproduce the bug?
What is the expected behavior?
What do you see instead?
Additional information
No response