Closed rohit-nayak123 closed 2 months ago
Bun does not support musl-based Alpine.
https://github.com/rohit-nayak123/compresspics/commit/15f605f8561e1497980a5442e59f7d53bf86b315
Please see https://github.com/oven-sh/bun/issues/918
So which bun image I should use for my project, any suggestions?
I'd probably revert commit https://github.com/rohit-nayak123/compresspics/commit/15f605f8561e1497980a5442e59f7d53bf86b315 as Debian Linux uses glibc, which is supported by Bun. (I'm unsure why Bun provides a musl-based image when it isn't officially supported.)
Wow, it worked! I followed your advice and removed --target=bun-linux-x64-baseline
from the bun build command, and now it's working as before.
Thanks for quick response.
Hello @lovell! Can I please ask you for your opinion on an alternative solution for the same issue. I am currently using a Docker container for Next.js. However, I switched from node:18-alpine
to oven/bun:alpine
(bun alpine).
I faced the same error and I managed to solve it by adding this line to my Dockerfile:
RUN apk add --no-cache libstdc++ vips
I am also mentioning that I removed the line RUN apk add --no-cache libc6-compat
since it also relies on glibc. I am not sure if I will need it in the future.
Am I likely to face more issues in the future and do you still recommend switching to a distro which supports glibc? For example Debian Slim.
@todor0v Bun does not currently support musl-based Linux, please subscribe to https://github.com/oven-sh/bun/issues/918 for updates.
I am just trying to automatic the process of deployment in Azure app service by pushing the code to GitHub and creating a docker image from it and pushing it to docker hub using GitHub actions. Well, everything was working just fine until the latest update of Bun js., everything is fine in local but in productions with latest updates it is not.
link to my GitHub repo.
GitHub is able to create a docker image but when it is runed after finest it is showing error:
Possible install-time or require-time problem
You must confirm both of these before continuing.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.Are you using a supported runtime?
^18.17.0 || ^20.3.0 || >=21.0.0
If you cannot confirm any of these, please upgrade to the latest version and try again before opening an issue.
Are you using a supported package manager and installing optional dependencies?
--include=optional
--no-optional=false
If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.
What is the complete error message, including the full stack trace?
What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?