cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] npm error Exit handler never called! in next.js app

Open amirmmolazemi opened this issue 1 year ago • 4 comments

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:

  1. Deleting the package-lock.json file
  2. Removing the node_modules folder
  3. 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

amirmmolazemi avatar Jun 30 '25 18:06 amirmmolazemi

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

amittal1 avatar Jun 30 '25 19:06 amittal1

Same error for me on my Gitlab CICD

Environment

  • npm: 11.3.0
  • node: 22.16.0
  • OS Name: Ubuntu server 24.04

Masmarino avatar Jul 01 '25 11:07 Masmarino

It will help if anyone can provide basic reproduction steps, logs, config etc ?

milaninfy avatar Jul 07 '25 17:07 milaninfy

Similer/Duplicates:

  • https://github.com/npm/cli/issues/8428

milaninfy avatar Jul 10 '25 17:07 milaninfy