'npm Err Exit handler never called

$ npx create-react-app my-app

Creating a new React app in /data/data/com.termux/files/home/my-app.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template...

npm ERR! Exit handler never called!

npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://github.com/npm/cli/issues

npm ERR! A complete log of this run can be found in: npm ERR! /data/data/com.termux/files/home/.npm/_logs/2021-10-11T17_09_35_089Z-debug.log

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... node_modules Deleting generated file... package.json Deleting my-app/ from /data/data/com.termux/files/home Done.



Solution 1:[1]

Simply downgrade your npm version to npm6 by running this command in node-

npm install -g npm@6

This will solve your issue because I have this same issue and downgrading my npm version solved it.

Solution 2:[2]

i had the same problem npm install --no-package-lock solved it for me.

If it doesn't work try to delete the package-lock.json and then npm install

Solution 3:[3]

Remove package-lock.json and than run: npm i, it should work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 buddemat
Solution 2 Akash Kumar
Solution 3 Tyler2P