cli
cli copied to clipboard
[BUG] Exit handler never called!
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
On executing npm i
it tells me that the exit handler was never called on npm version 8.19.1 on Termux for Android
Expected Behavior
I expected it to install the npm packages as it had in the past
Steps To Reproduce
- In Termux on Android (F-Droid version of Termux)
- With this config... After running
pkg install nodejs
andnpm i -g npm
to set it up - Run 'npm i'
- See error
Exit handler never called!
Environment
- npm: 8.19.1
- Node.js: 18.7.0
- OS Name: Android 12
- System Model Name: Samsung Galaxy A32 5G
- npm config:
; npm config ls
; "user" config from /data/data/com.termux/files/home/.npmrc
foreground-scripts = true
; node bin location = /data/data/com.termux/files/usr/bin/node
; node version = v18.7.0
; npm local prefix = /storage/emulated/0/Download/Botemo
; npm version = 8.19.1
; cwd = /storage/emulated/0/Download/Botemo
; HOME = /data/data/com.termux/files/home
Was originally on replit so here's the link for it to see the package.json if needed https://replit.com/@Natemo6348/Botemo#package.json
I attempted to both update nodejs and npm with no results, edited original comment to reflect the new versions
Removing package-lock.json causes it to return the same error for every package I attempt to install with npm. Example:
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@discordjs%2fopus reason: Invalid response body while trying to fetch https://registry.npmjs.org/@discordjs%2fopus: EACCES: permission denied, link '/data/data/com.termux/files/home/.npm/_cacache/tmp/38614c69' -> '/data/data/com.termux/files/home/.npm/_cacache/content-v2/sha512/93/23/c4178d08f033b89e054b62f42fe1958cfeb66cae6d9ff61c29eea05d8b2c5b68d906c16a1d5e7564611683635498d4df3916bdab3202950845361d4e86cb'
npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2022-09-12T10_14_03_664Z-debug-0.log```
Can you try without termux? It sets PREFIX which can conflict with npm.
Can you try without termux? It sets PREFIX which can conflict with npm.
Do you know of any alternatives on Android I can try? Edit: this has all worked in the past, so I don't think termux is causing the problem (I could be wrong but that's what I think)
I figured out the problem, using npm to globally update npm breaks it in Termux, although I'm not sure why it had an error prior to updating npm since it's just gone