Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Build from Dockerfile: ERROR: failed to solve: process "/bin/sh -c bun run build" #15

Open
patelmail opened this issue Feb 14, 2025 · 0 comments

Comments

@patelmail
Copy link

patelmail commented Feb 14, 2025

Describe the bug
I tried to build and push this Docker image with GitHub actions on my fork and ran into this issue. Important to note I was getting the same error when trying to build on my local machine.

ERROR: failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1

Seems like we cannot successfully build the image automatically or manually. Unsure of the fix because the error is generic but appears to have something to do with Stripe.

To Reproduce
Steps to reproduce the behavior:

  1. Build the image. See my fork here.

Expected behavior
Image should be built successfully and pushed to GHCR. Instead, we get this error.

Desktop (please complete the following information):

  • GitHub Actions
  • Ubuntu 24.04 - (amd64)

Additional context
Are there hardcoded Stripe values in here? This is part of the reason why I asked for pre-built images a month ago. Does the Stripe integration need to be in the self-hosted image?

The entire Docker setup is so convoluted and hard to follow. The design of this app is beautiful but I can't even get it to work. For now I'll stick to the tried and true: Shlink/Kutt or YOURLS.

Here's the longer snippet of the build error:
#11 13.36 error: 158 |         _setAuthenticator(key, authenticator) {
#11 13.36 159 |             if (key && authenticator) {
#11 13.36 160 |                 throw new Error("Can't specify both apiKey and authenticator");
#11 13.36 161 |             }
#11 13.36 162 |             if (!key && !authenticator) {
#11 13.36 163 |                 throw new Error('Neither apiKey nor config.authenticator provided');
#11 13.36                             ^
#11 13.36 error: Neither apiKey nor config.authenticator provided
#11 13.36       at _setAuthenticator (/app/node_modules/stripe/esm/stripe.core.js:163:23)
#11 13.36       at new Stripe (/app/node_modules/stripe/esm/stripe.core.js:99:14)
#11 13.36       at /app/.svelte-kit/output/server/chunks/stripe.js:3:16
#11 13.36 
#11 13.36       at emitError (node:worker_threads:205:13)
#11 13.36 x Build failed in 11.24s
#11 13.37 error during build:
#11 13.37 Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
#11 13.37 (vite-plugin-sveltekit-compile) writeBundle
#11 13.37     at handleBeforeExit (/app/node_modules/rollup/dist/es/shared/node-entry.js:22188:32)
#11 13.47 error: script "build" exited with code 1
#11 ERROR: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1
------
 > [6/6] RUN bun run build:
13.36       at new Stripe (/app/node_modules/stripe/esm/stripe.core.js:99:14)
13.36       at /app/.svelte-kit/output/server/chunks/stripe.js:3:16
13.36 
13.36       at emitError (node:worker_threads:205:13)
13.36 x Build failed in 11.24s
13.37 error during build:
13.37 Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
13.37 (vite-plugin-sveltekit-compile) writeBundle
13.37     at handleBeforeExit (/app/node_modules/rollup/dist/es/shared/node-entry.js:22188:32)
13.47 error: script "build" exited with code 1
------
Dockerfile:8
--------------------
   6 |     
   7 |     COPY . .
   8 | >>> RUN bun run build
   9 |     
  10 |     EXPOSE 3000
--------------------
ERROR: failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c bun run build" did not complete successfully: exit code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant