Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm pkg install v0.118.0 Latest[Bug]: #3191

Closed
PetersonIhmes opened this issue Jan 17, 2023 · 1 comment
Closed

Npm pkg install v0.118.0 Latest[Bug]: #3191

PetersonIhmes opened this issue Jan 17, 2023 · 1 comment

Comments

@PetersonIhmes
Copy link

Problem description

I installed the globalglobal version because I don't know what my device is.
I downloaded the latest version,v0.118.0
Latest, However, when installing the mode and updating the bode to the latest version, npm and npx commands started to give an error.I did the repository switching test, but I keep getting an error, for example to download typescript -g or create a new React

Steps to reproduce the behavior.

~ $ npm install git --no-bin-links
npm ERR! code EACCES
npm ERR! syscall link
npm ERR! path /data/data/com.termux/files/home/.npm/_cacache/tmp/3e78b391
npm ERR! dest /data/data/com.termux/files/home/.npm/_cacache/content-v2/sha512/0e/17/0acd7bf7f238c1d98f4caca4d71879601561f1fe89a9cab4d30a539a6017ce3b91fb2931ebb3c93345905003892b929512b993c613d677b8a5d986993316
npm ERR! errno EACCES
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 10274:10274 "/data/data/com.termux/files/home/.npm"

npm ERR! A complete log of this run can be found in:
npm ERR! /data/data/com.termux/files/home/.npm/_logs/2023-01-17T11_57_15_782Z-debug-0.log

What is the expected behavior?

v0.118.0 Latest

npm init error
npm install error
npm install -g error
npx create-react-app

System information

  • Termux application version:
  • Android OS version:
  • Device model:
@thunder-coding
Copy link
Member

Do not manually upgrade npm. See termux/termux-packages#13293.

Apparantly this behaviour is patched in npm provided by the nodejs and nodejs-lts package. In order to fix this issue, run the following:

rm -rf $PREFIX/lib/node_modules/npm
pkg install nodejs # or nodejs-lts (incase you want the lts release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants