Pengwin icon indicating copy to clipboard operation
Pengwin copied to clipboard

Installed program missing after finishing setup

Open kamalhm opened this issue 6 years ago • 16 comments

Describe the bug I'm currently on Windows 10 Home (not on any insider ring), using WSL 1 and Pengwin

After I installed Pengwin, I do my pengwin-setup and install programming languages such as nodejs and python, then change the default shell to fish. But after all the setup is completed and done, I can't seem to find any installation of python/node/npm

when i type which node it didn't show anything, even back in Bash.

kamalhm avatar Aug 26 '19 05:08 kamalhm

I am tracking a similar issue with Go in #524.

What happens if you close Pengwin and re-open it?

sirredbeard avatar Aug 26 '19 15:08 sirredbeard

The same as before, pengwin didn't detect any installation of node/python/npm edit I tried reinstalling with the steps as follows:

  1. install node -> node doesnt work if the shell is not restarted
  2. restart bash
  3. node worked
  4. install fish
  5. restart and enter fish -> node not found
  6. go back to bash -> node not found

edit again I think there are problems with the fish installer

I tried installing node and zsh, after restarting, node works on bash and zsh

kamalhm avatar Aug 27 '19 09:08 kamalhm

have found the reason for this, just thinking about a fix. it's tricky as fish isn't posix compliant so always needs separate shell configuration files. will get it fixed though don't you worry 👍

ghost avatar Aug 31 '19 17:08 ghost

okay so it turns out that neither of the 2 main nodejs version managers (n and nvm) support the fish shell, which doesn't surprise me given what i said above. but there might be a way around it using a plugin for fish called bass which i'm looking into

ghost avatar Sep 02 '19 16:09 ghost

okay i have a solution in the form of packing each of the commands into fish functions that call n / nvm using the bass plugin (https://github.com/edc/bass) - though as it switches to bash to execute things then switch back the performance is not great.

ghost avatar Sep 02 '19 17:09 ghost

how about giving option to install node and then choose either:

  1. latest
  2. lts

without any package manager? sometimes I just need to get up and running quickly I dont mind not using n/nvm

kamalhm avatar Sep 02 '19 17:09 kamalhm

how about giving option to install node and then choose either:

  1. latest
  2. lts

without any package manager? sometimes I just need to get up and running quickly I dont mind not using n/nvm

have taken this approach and am working on it now. expect a PR into pengwin-setup/development later today

edit: done! see https://github.com/WhitewaterFoundry/pengwin-setup/pull/201

ghost avatar Sep 03 '19 11:09 ghost

Whoa amazing! when will the changes deployed?

Thanks @grufwub and @sirredbeard, I think we can safely close this issue now

kamalhm avatar Sep 03 '19 15:09 kamalhm

@grufwub Did you push your workaround based on the fish functions, is that still in progress, or did I just miss it?

sirredbeard avatar Sep 03 '19 15:09 sirredbeard

@grufwub Did you push your workaround based on the fish functions, is that still in progress, or did I just miss it?

didn't end up pushing those changes as the performance wasn't up to it, but i can work on this and add it as a work-around too if you'd like? though given how it works i'd only feel comfortable marking it as [EXPERIMENTAL] as it might have issues

Whoa amazing! when will the changes deployed?

Thanks @grufwub and @sirredbeard, I think we can safely close this issue now

they're currently in the development branch so whenever our next development pull is! not 100% sure of when but keep an eye on the main repo here or the https://github.com/whitewaterfoundry/pengwin-setup repo PRs to track when the next development pull happens :blush:

ghost avatar Sep 03 '19 17:09 ghost

I am going to leave this open for now while we explore the 🐟🐚 workarounds.

sirredbeard avatar Sep 03 '19 22:09 sirredbeard

have /most/ of a workaround written up here: https://github.com/WhitewaterFoundry/pengwin-setup/pull/205

n is very simple, just adding it to path which the default installer doesn't manage (though i'm unsure whether there will be other issues given they don't natively support it)

nvm requires wrapping nvm, npm and node within functions and at the moment it doesn't automatically set the version so you have to call nvm use before using it in a fish instance.

ghost avatar Sep 04 '19 11:09 ghost

it should be in a place where we can begin testing of it now! only thing i don't think will be possible is scripting, though i'm not sure how common fish shell scripting really is...

ghost avatar Sep 04 '19 15:09 ghost

I am also experiencing this issue. Is there a workaround? I've even tried switching from fish to bash and it still doesn't work.

DamianReeves avatar Sep 23 '19 14:09 DamianReeves

@DamianReeves unfortunately not yet, but wait for the 1.3 release though, it should fix it.

When you've installed fish and change to bash, the installed programs are somehow lost, so you need to restart the setup without installing fish

kamalhm avatar Sep 23 '19 23:09 kamalhm

Run:

sudo apt-get update sudo apt-get upgrade

And try again with the installer.

sirredbeard avatar Sep 24 '19 03:09 sirredbeard