Open 4Furki4 opened 9 months ago
I noticed that reinstalling Bun using npm install -g bun
solved the issue. I can install packages and run my applications with Bun. However, installing Bun using curl -fsSL https://bun.sh/install | bash
still doesn't work.
I'm running into the same issue while trying to build my Docker file using Docker-in-Docker (dind). My setup:
Dockerfile
FROM oven/bun:1 as builder
WORKDIR /app
COPY . .
RUN bun install
RUN bun run build
Outcome
#9 [5/6] RUN bun install
#9 0.376 bun install v1.0.25 (a8ff7be6)
#9 3.388 error: Failed to spawn script postinstall due to error os.linux.errno.generic.E.PERM PERM
#9 3.487 error: Failed to spawn script install due to error os.linux.errno.generic.E.PERM PERM
I'm using docker:24-dind
and docker:24
to build.
This error occurs while running build on a GitLab Runner (running Linux). I tried the same setup in macOS 14.2 (also using dind), which worked fine.
More context:
bun install --verbose
shows that it's @swc/core
's post install script and msgpackr-extract
's install script that are failing
I am having the same issue, I am using wsl on windows
Anyone able to resolve this yet?
[Edit]- I was able to resolve this, I just needed to upgrade bun (1.0.26), and node version (make sure node version is at least > 14.), also bun depends on unzip (make sure it's in PATH), while in wsl shell you might need to do source ~/.bashrc
For some reason this issue started popping up for me whenever a package has a postinstall
script in the package.json. I can confirm this issue is still ongoing on Ubuntu.
What version of Bun is running?
1.0.20
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
I cannot install node packages using
bun install
even thoughnpm install
works.The other problem is that even though I install packages with
npm i
,bun run dev
doesn't even boot my Next.js project.To reproduce the bug, create a next project and try to install packages or run the project.
What is the expected behavior?
bun install
should've installed node packages andbun run dev
should've run my project likenpm install
andnpm run dev
doWhat do you see instead?
The error I receive in the terminal when I run
bun install
: It gets stuck on installing bycrypt.when I run
bun run dev
(packages installed usingnpm install
)Additional information
I reset my laptop a couple of days ago, Bun was running as expected before the reset. None of my configs changed. I'm still using the same version of Bun and WSL. Node version is v20.10.0 npm version is 10.2.3 WSL version is 2.0.9.0