-
Notifications
You must be signed in to change notification settings - Fork 1.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
Esbuild fails after upgrading from Node 20.2 to 20.3 #3156
Comments
I'm not sure why this happens for you. The problem has something to do with the |
Do you have any suggestions on how do debug? I've tried everything I can think of and nothing seems to work. |
I was able to recreate the issue by doing the following.
Can others try this on there environments? Also, attached is the log file. |
I'm very unfamiliar with this situation. I did a search for that error and found this: https://lwn.net/Articles/866493/. So it sounds like some problem that happens with Linux when something tries to modify an executable file while it's running. In this case it would probably be necessary to figure out how that is happening. The esbuild install script does overwrite the executable, but it deliberately does that using Some thoughts:
|
@evanw, thank you for the suggestions. I'll do some more digging at some other point, but I won't have any more time today. FYI, when just installing esbuild it fails in the same way.
Log file: 2023-06-10T18_03_58_590Z-debug-0.log |
@evanw, I edited and attached another log file on the previous post. |
My guess would be that it's due to the libuv 1.45.0 update in nodejs/node#48078, which has a huge changelog and mentions Linux filesystem improvements, likely affecting esbuild. |
@JoostK, can you replicate the error? |
I was able to replicate this today when trying to build a Docker image with a base image of I went back to ETA: For me, anything from |
Interestingly, I cannot. Running docker run --rm node:20.3 bash -c 'mkdir /app && cd /app && npm i [email protected]' on both macOS 13.3 (M1) and Windows 10 (WSL2) works just fine. |
Same issue here building a new Laravel app in Docker. package.json:
Dockerfile:
Result:
Specifying node:20.2 in my Dockerfile works |
Absolute minimum sample repo here: https://github.com/colincameron/test-node-error
Output:
|
Your code doesn't work for me. The only thing that is different is I'm on MacOS 13.4 and I'm using an M1 Max. What version of Docker are you using? Here is a screenshot of my version. |
Hmm, perhaps that means this is a bug with Docker? Can anyone reproduce this in Linux running outside of Docker? |
Can't reproduce on Arch Linux locally, only inside docker. |
npm install [email protected] works on node:20.2.0 on docker for mac 4.20.1 Definitely seems the issue was introduced in node between 20.2.0 and 20.3.0 Repro: $ docker version
Client:
Cloud integration: v1.0.33
Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:16 2023
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.20.1 (110738)
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:50:59 2023
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ docker run --rm --workdir /tmp node:20.2.0 npm install [email protected]
added 2 packages in 1s
npm notice
npm notice New minor version of npm available! 9.6.6 -> 9.7.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.1>
npm notice Run `npm install -g [email protected]` to update!
npm notice
$ docker run --rm --workdir /tmp node:20.3.0 npm install [email protected]
npm notice
npm notice New minor version of npm available! 9.6.7 -> 9.7.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.1>
npm notice Run `npm install -g [email protected]` to update!
npm notice
npm ERR! code 1
npm ERR! path /tmp/node_modules/esbuild
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! node:internal/errors:496
npm ERR! ErrorCaptureStackTrace(err);
npm ERR! ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync /tmp/node_modules/esbuild/bin/esbuild ETXTBSY
npm ERR! at Object.spawnSync (node:internal/child_process:1117:20)
npm ERR! at spawnSync (node:child_process:871:24)
npm ERR! at Object.execFileSync (node:child_process:914:15)
npm ERR! at validateBinaryVersion (/tmp/node_modules/esbuild/install.js:98:28)
npm ERR! at /tmp/node_modules/esbuild/install.js:285:5 {
npm ERR! errno: -26,
npm ERR! code: 'ETXTBSY',
npm ERR! syscall: 'spawnSync /tmp/node_modules/esbuild/bin/esbuild',
npm ERR! path: '/tmp/node_modules/esbuild/bin/esbuild',
npm ERR! spawnargs: [ '--version' ],
npm ERR! error: [Circular *1],
npm ERR! status: null,
npm ERR! signal: null,
npm ERR! output: null,
npm ERR! pid: 0,
npm ERR! stdout: null,
npm ERR! stderr: null
npm ERR! }
npm ERR!
npm ERR! Node.js v20.3.0
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-06-12T15_59_17_227Z-debug-0.log |
I think it points to a change in a dependency between the |
Anyone know someone that manages the node:20.3 image or where you're suppose to report something like this to? |
Same issue here. Running on GKE builders in the CI. The node:alpine-based images suddently stopped building accross all pipelines due to the below error:
|
It looks like this problem has already been reported to the people that maintain the Docker image for node: nodejs/docker-node#1912. I'm closing this issue because this doesn't appear to be a problem with esbuild. That other issue is likely a better place for this discussion. |
I also had the same issue and I am fully convinced now that the problem is from node 20 forward. Will be downgrading to version 18 to install esbuild. |
I has same issue when my node is 20.3. After downgrading to 20.2, problem dispear |
For my django-base-site project dependabot alerted that there was a new version of Node and created a PR to upgrade from 20.2 to 20.3. The build seems to work in the Github Actions environment, however when I try to run
docker compose build nod
locally on my MacBook Pro M1 the build fails with the following error.It's weird to me that the build passes in Github Actions environment using Docker, but not on my MacBook Pro using Docker. I'm using the latest version of Docker 4.20.1 (110738).
The text was updated successfully, but these errors were encountered: