8

$ 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.

Mukesh Pilane
  • 129
  • 1
  • 1
  • 7
  • With [this error being very generic and not likely the same issue as others with the same error message have](https://github.com/npm/cli/wiki/%22cb()-never-called%3F-Exit-handler-never-called%3F-I'm-having-the-same-problem!%22), it is probably the best to follow the instructions the error itself gave you: Report it to npm if not already reported. (Additionally, it would be helpful to see the complete log...) - In particular, it seems [this is closest to your issue](https://github.com/npm/cli/issues/3801)... - Termux is a very constrained environment, such huge packages may not work there. – CherryDT Oct 11 '21 at 19:06

4 Answers4

9

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.

buddemat
  • 4,552
  • 14
  • 29
  • 49
Saksham
  • 91
  • 2
4

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

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
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

0

This error message is usually caused by a problem with the npm cache. You can try clearing the cache by running the following command in your terminal:

npm cache clean --force

If that doesn’t work, you can try deleting the node_modules folder and then running npm install again.

dboatengg
  • 1
  • 2