Skip to content

Installation failed on Termux (Android 11) #3329

@xiongnemo

Description

@xiongnemo

OS/Web Information

  • Web Browser: None
  • Local OS: None
  • Remote OS: Termux (Android 11) on Redmi K40 (alioth)
  • Remote Architecture: arm64
  • code-server --version: None

Steps to Reproduce

It seems platform-related, as I didn't reproduce it in another phone running Android 9.

yarn global add code-server

Expected

code-server be installed normally.

Actual

Failed after few seconds (before postinstall.sh ran)

error /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server: Command failed.
Exit code: 127
Command: ./postinstall.sh
Arguments:
Directory: /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server
Output:
/data/data/com.termux/files/usr/bin/sh: 1: ./postinstall.sh: not found

Logs

npm run postinstall's log:

> $ cat /data/data/com.termux/files/home/.npm/_logs/2021-05-09T09_49_23_933Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/data/data/com.termux/files/usr/bin/node',
1 verbose cli   '/data/data/com.termux/files/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'postinstall'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'postinstall' ]
5 info lifecycle [email protected]~postinstall: [email protected]
6 verbose lifecycle [email protected]~postinstall: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~postinstall: PATH: /data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/node_modules/.bin:/data/data/com.termux/files/home/.config/yarn/global/node_modules/.bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets
8 verbose lifecycle [email protected]~postinstall: CWD: /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server
9 silly lifecycle [email protected]~postinstall: Args: [ '-c', './postinstall.sh' ]
10 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
11 verbose stack Error: [email protected] postinstall: `./postinstall.sh`
11 verbose stack spawn ENOENT
11 verbose stack     at ChildProcess.<anonymous> (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
11 verbose stack     at ChildProcess.emit (events.js:315:20)
11 verbose stack     at maybeClose (internal/child_process.js:1048:16)
11 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
12 verbose pkgid [email protected]
13 verbose cwd /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server
14 verbose Linux 4.19.113-perf-gadd6d93db79e
15 verbose argv "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/bin/npm" "run" "postinstall"
16 verbose node v14.15.4
17 verbose npm  v6.14.10
18 error code ELIFECYCLE
19 error syscall spawn
20 error file sh
21 error errno ENOENT
22 error [email protected] postinstall: `./postinstall.sh`
22 error spawn ENOENT
23 error Failed at the [email protected] postinstall script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Screenshot

image

Notes

bash postinstall.sh "executes" the script.

image

/usr/bin/env does not work on this model, while on the other phone it works.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions