-
Notifications
You must be signed in to change notification settings - Fork 3.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
[BUG] npm error Exit handler never called! #7639
Comments
=> [2/6] WORKDIR /home/nick/backend 11.2s
=> [3/6] COPY package*.json ./ 0.5s
=> ERROR [4/6] RUN npm install 444.5s
------
> [4/6] RUN npm install:
443.7 npm error Exit handler never called!
443.7 npm error This is an error with npm itself. Please report this error at:
443.7 npm error <https://github.com/npm/cli/issues>
443.7
443.7
443.7 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-07-11T01_54_36_226Z-debug-0.log
------
Dockerfile:9
--------------------
7 | # Install app dependencies
8 | COPY package*.json ./
9 | >>> RUN npm install
10 |
11 | # Copy the rest of the application code
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install" did not complete successfully: exit code: 1 |
this error can arise for a number of reasons; Please read this document & provide as much information as possible if you're able to consistently reproduce this error. Please includes things like package.json, lock file if exists, logs, steps to reproduce etc. |
…10536) Frontend docker container build fails with new npm:latest (20.15.1) version. See npm/cli#7639 This PR set the version to the previous 20.15.0 until it's fixed. -- Co-authored-by: Alex Garel <alex@garel.org>
i get this error too anyone with a solution |
We are hitting this with our Node 22 CI builds (as 22 now include npm 10.8.2). I appreciate root cause could be completely different to the OP issue, but the timing is suspicious as the failures have only started with 10.8.2. It fails with the following package file: https://github.com/node-red/node-red/blob/a1bf270ba6ba542b35b53447807801ce85b6d147/package.json I'll see if I can narrow it down further. |
for which exact node version it's failing ? if you are using 22.5.0 and npm(10.8.2) and it's failing, could you please try with 22.4.1 and npm 10.8.2 if possible? |
After commenting, I dug around and found the linked issue, including the one in the node repo. Looks like plenty of eyes are on it and not much I can usefully add - so will avoid generating any more noise. But I can confirm the install works with 22.4.1 and npm 10.8.2. |
I started running into this issue in our docker build sometime in the last week. These are the versions I was running when it happened: |
This issue is being tracked at #7657 and is caused by nodejs/node#53902. |
If you are curious on the progress to a solution, it is being discussed on Slack at https://openjs-foundation.slack.com/archives/CTEDKHCTB/p1721324768673819 |
Fixed in Node.js v22.5.1 nodejs/node#53902 (comment) |
Are there any solutions for Node.js v18.20.4 for that matter? Because initially bug was reported for this version. I have the same error. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
1.648 npm warn using --force Recommended protections disabled.
152.0 npm error Exit handler never called!
152.0 npm error This is an error with npm itself. Please report this error at:
152.0 npm error https://github.com/npm/cli/issues
152.0
152.1
152.1 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-07-11T01_38_27_566Z-debug-0.log
Expected Behavior
expected to build docker image but throws that error when it gets to npm install.
Use the official Node.js image as a base
FROM node:18.20.4
Set the working directory
WORKDIR /home/nick/backend
Install app dependencies
COPY package*.json ./
RUN npm install
Copy the rest of the application code
COPY . .
Build the TypeScript code
RUN npm run build
Expose the port the app runs on
EXPOSE 35001
Command to run the app
CMD ["node", "dist/index.js"]
Steps To Reproduce
No response
Environment
The text was updated successfully, but these errors were encountered: