Closed matheusgrieger closed 5 years ago
What happens if you set -x
before running nvm uninstall 10.9
? (it'll be a lot of output; let's hide it behind a <details>
)
I can't copy the output, the terminal window closes when running nvm uninstall
. What can I do to keep it open?
Ok, I have managed to keep it alive, here's the output.
I have not included most of the output, since it took all available lines from the terminal window, and that would be too much.
Thanks, so it's failing in nvm_check_file_permissions
- presumably you can reproduce this with nvm_check_file_permissions "$(nvm_version_path v10.9.0)"
?
Any chance /home/matheus/.nvm/versions/node/v10.9.0/lib/node_modules/cordova/node_modules/cordova-js/tasks/vendor/commonjs-tests/modules/1.0/nested
contains some symlinks, or some files with weird permissions?
presumably you can reproduce this with
nvm_check_file_permissions "$(nvm_version_path v10.9.0)"
?
Apparently not, without set -x
there is no output whatsoever. With it, though, there are loads of outputs, but nothing that seems intereseting. It doesn't fail with that same error.
contains some symlinks, or some files with weird permissions?
Not that I could see. They are simple files with common permissions and my user is currently the owner of all of them. However I'm not quite sure how to look for those (I'm not that savvy with Linux).
I have noticed something interesting. When using Tab to autocomplete folders and Git branches, I'm getting the same realloc
error. Is it something to do with zsh or oh-my-zsh, maybe?
That's entirely possible - you could try disabling the autocompletion temporarily and see if that makes a difference.
Sorry! I have had my laptop changed in the past couple of days and I'm not using a Linux system anymore. However, since I have access to my old one still, I will test it out during the weekend and follow up on the issue.
So I'm also seeing my 2 different terminals close when I run nvm uninstall 8.4
. I'm also using zsh. nvm --version
is 0.34
.
$ nvm --version
0.34.0
$ set -x
$ nvm uninstall 8.4 &> log.txt
$ tail -n6 log.txt
+nvm_check_file_permissions:1> nvm_is_zsh
+nvm_is_zsh:1> [ -n 5.4.2 ']'
+nvm_check_file_permissions:1> setopt local_options nonomatch
+nvm_check_file_permissions:2> FILE=/home/nick/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan
+nvm_check_file_permissions:3> [ -d /home/nick/.nvm/versions/node/v8.4.0/lib/node_modules/npm/node_modules/libnpx/node_modules/yargs/node_modules/cliui/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan ']'
realloc(): invalid next size
I suspect this is a bug in zsh, simply exposed via nvm. Google-ing the above error message plush zsh turns up lots of hits.
Sounds like zsh 5.5 and newer fix this: https://github.com/rvm/rvm/issues/4214#issuecomment-398786401. I'm running:
➜ node-nanomsg git:(gypi) zsh --version
zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
(I recommend the maintainers close this bug)
Operating system and version: Ubuntu 18.04.1 + zsh + oh-my-zsh
nvm debug
output:nvm ls
output:How did you install
nvm
? Install script from READMEWhat steps did you perform? Tried to uninstall older unused Node versions (9.11.1, 10.9.0, 10.11.0) running
nvm uninstall 9.11.1
,nvm uninstall 10.9
What happened? Terminal closed showing the following error:
What did you expect to happen? Uninstall specified version.
Is there anything in any of your profile files (
.bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
? Yes, as I have entries for Android SDK, Java and others.