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

permission error with yarn global add #4664

Closed
wangnengjie opened this issue Dec 18, 2019 · 7 comments
Closed

permission error with yarn global add #4664

wangnengjie opened this issue Dec 18, 2019 · 7 comments
Labels
bug report Something is not working properly

Comments

@wangnengjie
Copy link

Problem description
Every time I use yarn global add xxx will get a permisson denied error. I first think it is caused by root permisson. Since I did not root my phone, I use proot. But get another error. I am not really familiar with that. I wonder whether it is caused by Android 10.

Steps to reproduce

yarn global add serve \\get permission denied
unset LD_PRELOAD
termux-chroot \\another error I will paste below

Additional information

  • yarn-error.log
Arguments:
  /data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/share/yarn/bin/yarn.js global add serve

PATH:
  /data/data/com.termux/files/home/bin:/usr/local/bin:/data/data/com.termux/files/home/.cargo/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/data/data/com.termux/files/home/go/bin

Yarn version:
  1.19.2

Node version:
  13.0.0

Platform:
  android arm64

Trace:
  Error: EACCES: permission denied, copyfile '/data/data/com.termux/files/home/.cache/yarn/v6/npm-ansi-styles-3.2.1-41fbb20243e50b12be0f04b8dedbf07520ce841d-integrity/node_modules/ansi-styles/license' -> '/data/data/com.termux/files/home/.config/yarn/global/node_modules/ansi-styles/license'

npm manifest:
  No manifest

yarn manifest:
  No manifest

Lockfile:
  No lockfile
  • termux-chroot error
proot error: execve("/usr/bin/zsh"): Function not implemented
proot info: possible causes:
  * the program is a script but its interpreter (eg. /bin/sh) was not found;
  * the program is an ELF but its interpreter (eg. ld-linux.so) was not found;
  * the program is a foreign binary but qemu was not specified;
  * qemu does not work correctly (if specified);
  * the loader was not found or doesn't work.
fatal error: see `proot --help`.
proot error: trying to remove a directory outside of '/data/data/com.termux/files/usr/tmp', please report this error.
proot error: can't chmod '/data/data/com.termux/files/usr/tmp/proot-6957-Cv8mja': No such file or directory
  • termux-info
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# root-repo (sources.list.d/root.list)
deb https://dl.bintray.com/grimler/termux-root-packages-24 root stable
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# unstable-repo (sources.list.d/unstable.list)
deb https://dl.bintray.com/xeffyr/unstable-packages unstable main
Updatable packages:
All packages up to date
Android version:
10
Kernel build information:
Linux localhost 4.14.117-perf+ #1 SMP PREEMPT Sat Nov 30 01:22:12 CST 2019 aarch64 Android
Device manufacturer:
OnePlus
Device model:
GM1910
@Grimler91
Copy link
Member

Does ~/.config exist? If not, try creating it and try yarn global add serve again

@wangnengjie
Copy link
Author

Does ~/.config exist? If not, try creating it and try yarn global add serve again

@Grimler91 I'm sure I have ~/.config exist.

@Grimler91
Copy link
Member

Maybe a hard link problem then, that needs to be patched. I can't reproduce the error on my device

@ghost
Copy link

ghost commented Jan 9, 2020

Arguments: 
  /data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/usr/share/yarn/bin/yarn.js global add neovim

PATH: 
  /data/data/com.termux/files/usr/opt/rust-nightly/bin:/data/data/com.termux/files/usr/opt/rust-nightly/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/data/data/com.termux/files/home/.cargo/bin

Yarn version: 
  1.21.1

Node version: 
  13.0.0

Platform: 
  android arm64

Trace: 
  Error: EACCES: permission denied, copyfile '/data/data/com.termux/files/home/.cache/yarn/v6/npm-@msgpack-msgpack-1.10.0-f120822e641deef03aa0d2cfa2f257becd48d149-integrity/node_modules/@msgpack/msgpack/package.json' -> '/data/data/com.termux/files/home/.config/yarn/global/node_modules/@msgpack/msgpack/package.json'

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile

same

@ghost
Copy link

ghost commented Jan 9, 2020

Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.org/packages/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://dl.bintray.com/xeffyr/x11-packages x11 main
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# unstable-repo (sources.list.d/unstable.list)
deb https://dl.bintray.com/xeffyr/unstable-packages unstable main
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
Updatable packages:
busybox/stable 1.31.1-4 aarch64 [upgradable from: 1.31.1-3]
Android version:
10
Kernel build information:
Linux localhost 4.14.113-17369399 #1 SMP PREEMPT Tue Nov 26 23:09:17 KST 2019 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G975F

im on android 10 as well

@ghost
Copy link

ghost commented Jan 10, 2020

$ proot -l yarn global add neovim
yarn global v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EACCES: permission denied, copyfile '/data/data/com.termux/files/home/.cache/yarn/v6/npm-color-convert-1.9.3-bb71850690e1f136567de629d2d5471deda4c1e8-integrity/node_modules/color-convert/index.js' -> '/data/data/com.termux/files/home/.config/yarn/global/node_modules/color-convert/index.js'".
info If you think this is a bug, please open a bug report with the information provided in "/data/data/com.termux/files/home/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

proot --link2symlink doesnt work either

@fornwall fornwall added the bug report Something is not working properly label Jan 12, 2020
@ghost ghost mentioned this issue Jan 15, 2020
ghost pushed a commit that referenced this issue Jan 16, 2020
Issue #4664.

19824 ioctl(29, BTRFS_IOC_CLONE or FICLONE, 34 <unfinished ...>
19823 fstat64(30,  <unfinished ...>
19822 write(16, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
19821 close(31 <unfinished ...>
19804 <... epoll_pwait resumed>[{EPOLLIN, {u32=16, u64=16}}], 1024, 867, NULL, 8) = 1
19824 <... ioctl resumed>)              = -1 EACCES (Permission denied)
ghost pushed a commit that referenced this issue Jan 16, 2020
Issue #4664.

19824 ioctl(29, BTRFS_IOC_CLONE or FICLONE, 34 <unfinished ...>
19823 fstat64(30,  <unfinished ...>
19822 write(16, "\1\0\0\0\0\0\0\0", 8 <unfinished ...>
19821 close(31 <unfinished ...>
19804 <... epoll_pwait resumed>[{EPOLLIN, {u32=16, u64=16}}], 1024, 867, NULL, 8) = 1
19824 <... ioctl resumed>)              = -1 EACCES (Permission denied)
@ghost
Copy link

ghost commented Jan 16, 2020

Fixed in nodejs v13.0.0-1 (similar patch is applied to nodejs-lts too).

@ghost ghost closed this as completed Jan 16, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

3 participants