jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.08k stars 69 forks source link

failed writing body #154

Closed thernstig closed 2 years ago

thernstig commented 3 years ago

We still get the old (23) Failed writing body at times. This time it was found when installing nvm through fisher, but we deducated it was not fisher but actually nvm.fish still containing the problem (see https://github.com/jorgebucaran/fisher/issues/672).

~/code> fisher install jorgebucaran/nvm.fish
fisher install version 4.3.0
Fetching https://codeload.github.com/jorgebucaran/nvm.fish/tar.gz/HEAD
Installing jorgebucaran/nvm.fish
           /home/userA/.config/fish/functions/_nvm_index_update.fish
           /home/userA/.config/fish/functions/_nvm_list.fish
           /home/userA/.config/fish/functions/_nvm_version_activate.fish
           /home/userA/.config/fish/functions/_nvm_version_deactivate.fish
           /home/userA/.config/fish/functions/nvm.fish
           /home/userA/.config/fish/conf.d/nvm.fish
           /home/userA/.config/fish/completions/nvm.fish
Downloading the Node distribution index for the first time...
(23) Failed writing body
Installed 1 plugin/s
~/code> fisher --version
fisher, version 4.3.0

I am on Ubuntu 20.04.

meadowsys commented 3 years ago

I saw this once in a codespace. I didn't save the log cause I thought it was the codespace being funny. I think it's failing to get the node distribution index because I could only install a node version after running nvm list-remote first

jorgebucaran commented 3 years ago

Yes, that's exactly what may be happening sometimes:

https://github.com/jorgebucaran/nvm.fish/blob/2473afc53a7c09366550641011590472ea2a3f51/functions/_nvm_index_update.fish#L2-L7

I guess this could be solved by downloading the index separately first, then piping the content into the Awk filter.

Pytal commented 3 years ago

Will the solution be released?

jorgebucaran commented 3 years ago

I've yet to see this issue myself. Maybe try downloading the index and then piping it into the filter and see if you can reproduce the problem. If you can't, then send me PR.

aral commented 3 years ago

In case it helps, just ran into it too. Seems to have installed otherwise:

❯ nvm install 12.16.2

(23) Failed writing body
Installing Node v12.16.2 lts/erbium
Fetching https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.gz
Now using Node v12.16.2 (npm 6.14.4) ~/.local/share/nvm/v12.16.2/bin/node
jorgebucaran commented 3 years ago

Maybe try using this https://github.com/jorgebucaran/nvm.fish/issues/154#issuecomment-826018435 and see if you can still repro the issue.

jorgebucaran commented 2 years ago

Should be fixed in 2.2.6. I hope. 😅

UsAndRufus commented 2 years ago

I'm getting this issue again - not sure it's fixed. Addressed by running mkdir /Users/<username>/.local/share/nvm. If it makes a difference, I'm using a fresh MBP with M1.