Open Kabouik opened 4 years ago
Hi! You can keep your system version and it shouldn't interfere; installing node from any unofficial source is discouraged (nvm installs node from the only official source, nodejs.org/dist), and using a system node does require sudo for global installs.
Can you check ~/.npmrc
for a prefix line? Also, can you confirm if $HOME
is a symlink or not (hopefully not)?
The version of node we have is in a community repository actually. It is just 4.2.6-1 that was packaged several years ago, but we can probably trust it unless there are known security issues with that version.
I have no ~/.npmrc
, and I can confirm $HOME
is not a symlink in Sailfish.
ls: invalid option -- 'q'
in your nvm ls
output is concerning. Is there a chance that BusyBox has a noncompliant ls
?
First time I see any issue with ls
so I'm not sure. Seems to be standard, no?
[nemo@Sailfish ~]$ ls --version
ls: unrecognized option '--version'
BusyBox v1.31.0 (2020-03-27 07:18:49 UTC) multi-call binary.
Usage: ls [-1AaCxdLHRFplinshrSXvctukZ] [-w WIDTH] [FILE]...
List directory contents
-1 One column output
-a Include entries which start with .
-A Like -a, but exclude . and ..
-x List by lines
-d List directory entries instead of contents
-L Follow symlinks
-H Follow symlinks on command line
-R Recurse
-p Append / to dir entries
-F Append indicator (one of */=@|) to entries
-l Long listing format
-i List inode numbers
-n List numeric UIDs and GIDs instead of names
-s List allocated blocks
-lc List ctime
-lu List atime
--full-time List full date and time
-h Human readable sizes (1K 243M 2G)
--group-directories-first
-S Sort by size
-X Sort by extension
-v Sort by version
-t Sort by mtime
-tc Sort by ctime
-tu Sort by atime
-r Reverse sort order
-Z List security context and permission
-w N Format N columns wide
--color[={always,never,auto}] Control coloring
Where did you find ls: invalid option -- 'q'
actually? I can't see that in what I posted.
Expand the nvm ls output
Details section in your OP. nvm ls
shouldn't print out an ls
error.
My ls
outputs this:
$ ls --version
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
Oh damn I missed the expand!
Do you think I could try installing gnu-coreutils
for instance, see if it replaces ls
? Problem is it conflicts with busibox-symlinks-coreutils
that came by default, and I'm afraid uninstalling it might break things.
i | busybox-symlinks-coreutils | Busybox replacements for coreutils | package
| gnu-coreutils | The GNU core utilities: a set of tools commonly used in shell scripts | package
I"m not familiar with busybox so I'm not sure :-/ but i believe ls -q
is in POSIX, and nvm requires a POSIX shell.
I'm not fmailiar with a POSIX shell is. Is that something I can check with echo $SHELL
? It says /bin/bash
.
It's a standard, that shells try to comply with. Bash is supposed to be posix-compliant already.
Operating system and version:
Sailfish OS 3.3.0.16
nvm debug
output:nvm ls
output:How did you install
nvm
?I used the
wget
bash script one liner.What steps did you perform?
Prior to installing nvm using the script, I uninstalled node from my system repo (since I believe nvm is supposed to install it itself in user space) and deleted potential remnants from a prior installation:
I also made sure nothing related to node or nvm was in my
~/.bashrc
and~/.bash_profile
. Then I installed nvm using the script instructions in the readme ans sourced~/.bashrc
.What happened?
I then ran
nvm install --lts
, which downloaded it but I get this at the end:Running
nvm use --delete-prefix v12.17.0
as instructed did not help.What did you expect to happen?
I tried also other node versions, but every time I will get this
env: can't execute node: No such file or directory
Is there anything in any of your profile files that modifies the
PATH
?No:
Note that we have an old version of
node
available for installation through our package repository, and I used to use it successfully, however it's very old and therefore incompatible with many things now. Plus, as far as I understand, installing node from repository is discouraged because it will require root privileges to use npm afterwards, right?