-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Node 20.3.0 images give error /usr/bin/env: 'node': Text file busy
#1912
Comments
I can provide a more complete repro node project if that is needed. |
+1, getting an issue on this as well, had to switch to |
A colleague of mine running a Mac M1 has the same issue, but it works for me on PC (Ubuntu). Might be an issue for Mac M1 only. |
Can (temporarily) be fixed by using OrbStack instead of Docker for Mac |
Same here with Reverting to Only affected shell/bash scripts trying to start node (e.g. Only saw this on local dev and not pro container (but prod != ARM, so… 🤷🏼 ) |
Can confirm I got this issue on M1 mac and Pop!_os |
This is breaking in docker on x86 as well as M1 for us, and we get the same error on containers that start yarn. |
This issue was also observed in the following environments:
It is not limited to a specific Node.js project, but occurs in all projects that use However, this problem does not occur in the following environments:
|
This can be recreated in my project from commit b76bc9b with the frontend Dockerfile but I have since pushed this version: Seemingly related: Docker forums |
FYI there is another case of people hitting this problem here: evanw/esbuild#3156. |
Sharing an additional data point here as well (from evanw/esbuild#3156 (comment)): the issue only reproduces for me using Docker Engine 24, whereas the image works fine using Docker Engine 20. Tested on M1 Max. |
This was also happening with me and all my coworkers that use mac for development. The "solution" we found for now was to use OrbStack instead, it's a drop-in replacement for docker desktop, and seems to solve this problem. While not ideal, it did unblock us while we wait for the official solution. |
I started looking more closely at the libuv v1.45.0 upgrade after @JoostK mentioned it in the esbuild thread, particularly some of the changes around io_uring support. There is an environment variable (undocumented and unstable, intended for debugging purposes only) to disable libuv's use of io_uring, and with I also have an Arch Linux ARM virtual machine on my Mac separate from Docker Desktop, and tried building and installing libuv v1.45.0 there. In that case, I couldn't reproduce the same issue during an esbuild install, even though I could confirm with
|
Experiencing same issue here, but downgrading to
(which does backup what @ahamlinman mentioned above) |
Same here for a pipeline that run semantic-release. Gitlab - node:alpine
Error:
By retrying several times, it seems to work after a while.... I solved the problem temporarily by downgrading to an older node image. |
Not sure what causes this, but this is what I have found:
So I would guess this is some bug in node itself? |
FWIW, that specific libuv commit is not yet in any release so it didn't get to Node.js. Also, the fs sync operations aren't io_uring backed. |
@jkuchar can you elaborate exactly what steps to follow? I'd like to have a reproducer in that environment. Thanks! |
This was my test scenario environment: FROM ubuntu:22.04
# NodeJS & Chromium for tests
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt install -y nodejs |
I'm seeing this within a CircleCI linux environment when attempting to bump node from 20.2.0-alpine3.17 to 20.3.1-alpine3.17. This is the docker server info from CircleCI:
The error happened during `docker build`, when yarn tried running `react-scripts build`:
|
I could not reproduce in my system which is a Ubuntu 22.04 that was upgraded automatically from the Ubuntu 20.04. I notice a difference between my installed packages and my colleagues packages:
My Docker packages are We have the same versions for Docker: The
The production builds at our company didn't fail with the upgrade to |
Node 20.3.x doesn't work with our local versions of Docker so we must lock to 20.2.x for now [Issue on nodejs/docker-node](nodejs/docker-node#1912) #patch
I just add my experience. I had an old Docusaurus image built FROM node:20-alpine3.17 that worked without problem, the node version here was node 20.2.0 I had to rebuild this image than I switch it to node:20-alpine so I start getting this error because node was updated to latest 20.10.0 version and searching on internet I reached this issue. I solved the error switching back to node 20.2.0 (FROM node:20.2.0-alpine3.17) Edit: excuse me, I just had no time to read all the thread, I read it now and maybe this post is not so useful, but I want to add that my host is Ubuntu 22.04.1 with kernel 5.19.0-32, so as wrote by @santigimeno maybe this kernel version will never receive fix that can solve this, so at the moment my solution is to use node 20.2.0 |
The new version of chai pulled in as part of the update requires ESM only, which forces the test case to use ESM, which then forces the app.js to also use ESM. These changes make the test suite work with both "npm test" and "yarn test", though note that currently I need to set the environment variable "UV_USE_IO_URING=0" to avoid an error about "text file busy". I discovered this trick from a Github issue comment [1]. Hopefully this also works on AWS Lambda but we'll see. [1]: nodejs/docker-node#1912 (comment)
Experiencing this on Arch Linux (x86_64) as of updating to kernel 6.9.1. Failing to build AUR Edit: Dang, I thought this was the nodejs repo, my bad. |
@kode54 Thank you for the hint. So it must be caused by the 6.9.x kernel. |
Just adding another datapoint, Switching back to 6.8.x (lts kernel) fixes it. |
I have same issue with Arch 6.9, but after upgrade nodejs from 20.9 => 20.13 problem fixed also |
I have upgraded to |
same issue here on arch |
Cant get this working with arch linux 6.9.1-arch. tried nodejs-lts-hydrogen 18.20, nodejs-lts-iron 20.13 or nodejs 22.2 |
from yarn site - fixed this wired behavior without switching kernel version |
Please try Arch Linux's new kernel 6.9.2-1 and see if it makes a difference. |
Still the same error even with new kernel after reboot. Switched to the linux-lts kernel. |
At my side it got fixed with the upgrade from pnpm 9.1.2 to 9.1.3. I don't know if the fix is in any of these commits or it is just coincidence: |
Workaround to avoid downgrading the kernel: Ex: UV_USE_IO_URING=0 yarn dev |
I think it's a coincident as I"m also using pnpm version 9.1.3 with kernel 6.9.2-arch1-1 and still getting this error |
Nope, it doesn't make any difference still getting this error with 6.9.2-1 |
@ZulluBalti woopsi. |
Same error |
For anyone wondering on how to downgrade your arch kernel, you can downgrade to previous installations (of any package) from chache: |
Here is the issue tracked on nodejs/node nodejs/node#53051 |
Environment
Expected Behavior
yarn tsc should run correctly
Current Behavior
Possible Solution
downgrade to node:20-alpine3.16 (or node:20.2.0-bullseye-slim)
Steps to Reproduce
dockerfile:
yarn build
creates a directory, compiles some protobuf, then execstsc
(bin from typescript dependency)Additional Information
Things work correctly on 3.16, but give the
text file busy
error with 3.17 and 3.18. Also tried bullseye-slim andnode:20.3.0-bullseye-slim
gives the same error, but 20.2.0 works correctly.Maybe this is an architecture mismatch or file permissions problem?
The text was updated successfully, but these errors were encountered: