-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Node directory not found #2557
Comments
The nvm debug and ls output seems to be missing a lot of newlines - any chance you could try to copy and paste it again? |
$ nvm debug nvm --version: v0.38.0 $SHELL: /data/data/com.termux/files/usr/bin/bash
$SHLVL: 1 whoami: 'u0_a152'
${HOME}: /data/data/com.termux/files/home ${NVM_DIR}: '${HOME}/.nvm' ${PATH}: ${NVM_DIR}/versions/node/v16.6.2/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets $PREFIX: '' ${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 5.1.8(1)-release (aarch64-unknown-linux-android)'
uname -a: 'Linux 4.9.186-perf-18312766 #1 SMP PREEMPT Mon Jun 15 21:24:59 KST 2020 aarch64 Android' checksum binary: 'sha256sum'
curl: /data/data/com.termux/files/usr/bin/curl, curl 7.78.0 (aarch64-unknown-linux-android) libcurl/7.78.0 OpenSSL/1.1.1k zlib/1.2.11 libssh2/1.9.0 nghttp2/1.44.0 wget: /data/data/com.termux/files/usr/bin/wget, GNU Wget 1.21.1 built on linux-android.
git: /data/data/com.termux/files/usr/bin/git, git version 2.32.0grep: /data/data/com.termux/files/usr/bin/grep, grep (GNU grep) 3.6
awk: /data/data/com.termux/files/usr/bin/awk, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
sed: /data/data/com.termux/files/usr/bin/sed, sed (GNU sed) 4.8 cut: /data/data/com.termux/files/usr/bin/cut, cut (GNU coreutils) 8.32 basename: /data/data/com.termux/files/usr/bin/basename, basename (GNU coreutils) 8.32
rm: /data/data/com.termux/files/usr/bin/rm, rm (GNU coreutils) 8.32 mkdir: /data/data/com.termux/files/usr/bin/mkdir, mkdir (GNU coreutils) 8.32 xargs: /data/data/com.termux/files/usr/bin/xargs, xargs (GNU findutils) 4.8.0
nvm current: which node: ${NVM_DIR}/versions/node/v16.6.2/bin/node which iojs: which npm: ${NVM_DIR}/versions/node/v16.6.2/bin/npm
npm config get prefix: /data/data/com.termux/files/usr npm root -g: /data/data/com.termux/files/usr/lib/node_modules |
hmm, that still doesn't look formatted correctly :-/ however, i note that |
Same issue. Tried on Termux v0.117 (Android 9) and v0.83 (Android 6). Running 'node' or 'npm' commands throws an error 'No such file or directory' for that command file. Example error running 'node': $ node
-bash: /data/data/com.termux/files/home/.nvm/versions/node/v14.17.6/bin/node: No such file or directory Operating system and version: |
@koenigstag i believe termux uses a |
I'm running into the same issue on Termux. So do you mean it's a problem with for example hardcoded library paths within the node binary? For reference, here's the difference between
Also, the output of
|
what is nvm-node? |
I just did the following: $ nvm use v17.1.0
Now using node v17.1.0 (npm v8.1.2)
$ which node
/data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node
$ cp $(which node) nvm-node Note that in general I also did |
i am very very skeptical that will work; many things rely on the binary being named Indeed, because termux uses PREFIX, termux is incompatible with nvm, and somewhat incompatible with npm as well. I don't think this has any relationship to compiled binaries or shared libraries, though. How did you install your system node? |
Finally, Termux team updated apt repositories in latest release, and there is an option to install nodejs-lts v16 using apt. |
Just to clarify, the copying of node to nvm-node didn't change any behavior. I get the same results operating directly on the binary in its original location: $ strace /data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node --version
execve("/data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node", ["/data/data/com.termux/files/home"..., "--version"], 0x7fe27edbb8 /* 35 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++
$ du /data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node
78404 /data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node
$ readlink /data/data/com.termux/files/home/.nvm/versions/node/v17.1.0/bin/node
$ strace /data/data/com.termux/files/usr/bin/node --version
execve("/data/data/com.termux/files/usr/bin/node", ["/data/data/com.termux/files/usr/"..., "--version"], 0x7fde87b7a8 /* 32 vars */) = 0
getpid() = 4648
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7485e5c000
...
exit_group(0) = ?
+++ exited with 0 +++
$ du /data/data/com.termux/files/usr/bin/node
27980 /data/data/com.termux/files/usr/bin/node
$ readlink /data/data/com.termux/files/usr/bin/node You can see it fails immediately on the execve call. The system node at |
@koenigstag node should never be installed using apt, no matter the repo. |
Here's a case where running 32 bit executables on a 64 bit system cause a similar error. I'm curious, from nvm's side, what architecture is the binaries that are downloaded and how are they built? (assuming this question even makes sense; I'm super unfamiliar with node/nvm). My current hunch is either that the binary is the wrong architecture (ie. 32 bit vs 64 bit) binary or some missing symbols/libraries possibly due to the weird prefix, although I assumed if it were the latter the error would be with |
@MatthewScholefield nvm selects from one of the available binaries (that logic could always potentially be improved, of course), and falls back to node’s build process, occasionally prepopulating some of the CXX and adjacent variables. That’s really about it; if something doesn’t build right it’s either that nvm can provide build args to fix it, or, node itself has the problem. |
Operating system and version:
Android 10
nvm debug
output:nvm ls
output:How did you install
nvm
?Install script in readme
What steps did you perform?
nvm install node
nvm use node
What happened?
bash: /data/data/com.termux/files/home/.nvm/versions/node/v16.6.2/bin/node: No such file or directory
What did you expect to happen?
Start using node v16.6.2?
Is there anything in any of your profile files that modifies the
PATH
?No
The text was updated successfully, but these errors were encountered: