cli
cli copied to clipboard
[BUG] npm error Exit handler never called! in next.js app
Is there an existing issue for this?
- [x] I have searched the existing issues
This issue exists in the latest npm version
- [x] I am using the latest npm
Current Behavior
Hi!
I'm currently using the latest LTS version of Node.js (Node: 22.17.0 & npm: 10.9.2) and I'm getting an error when trying to build my Next.js v15.3.3 app project.
I've already tried:
- Deleting the
package-lock.jsonfile - Removing the
node_modulesfolder - Cleaning the cache using:
npm cache clean --force
Here's the error I get when trying to build my app:
npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error <https://github.com/npm/cli/issues>
npm error A complete log of this run can be found in: /root/.npm/_logs/2025-06-30T18_01_53_207Z-debug-0.log
Error: `npm ci` command failed.
You can also try deleting your `package-lock.json` file and run `liara deploy` again.
Expected Behavior
this is my expected Behavior
> next build
▲ Next.js 15.3.3
Creating an optimized production build ...
Linting and checking validity of types ...
Collecting page data ...
Finalizing page optimization ...
Collecting build traces ...
Steps To Reproduce
Environment
- npm: 10.9.2
- Node.js: 22.17.0
- OS Name: windows 11 Pro
Any way arounds for now?
Environment
- npm: 10.9.2
- Node.js: 22.17.0
- OS Name: Oracle Linux Server release 8.10 based off of
fedora
Same error for me on my Gitlab CICD
Environment
- npm: 11.3.0
- node: 22.16.0
- OS Name: Ubuntu server 24.04
It will help if anyone can provide basic reproduction steps, logs, config etc ?
Similer/Duplicates:
- https://github.com/npm/cli/issues/8428