Help with Silverblue,Nodejs install

Hi all,

I am new with Silverblue. After my distro hoping, I decided to stay with Fedora and Silverblue. Need stable and functional distro for my development ( front end dev).

As I understand, mostly I need to install apps from Flathub.

I found there Visual Studio code, which working great.

But I also need Nodejs, which is not on Flathub. How to proceed with that ?

Thanks

You’ll probably want to use it via toolbox.

1 Like

Thanks for the answer. As I am really new with immutable things, is this correct way to do it ?

In terminal :

toolbox create my-nodejs
toolbox enter my-nodejs

Than in “my-nodejs” container normally install :

sudo dnf install nodejs

And once Node.js and npm are installed, I can exit the toolbox container:

exit

Thanks

1 Like

You can find the docs at Toolbox :: Fedora Docs

1 Like

Thank you @marko94 , your example is more useful than the Toolbox docs, and more correct than the NodeJS docs Node.js — Installing Node.js via package manager

If you installed NodeJS in the toolbox, you also need to install the IDE in there. Everything in one environment.

You can also always layer packages if that is easier and doesnt go completely through the top. When developing, building, compiling, a toolbox or distrobox is often better to keep the system clean.

I would recommend to layer distrobox and use that instead. Has some key advantages, mainly

  • distrobox-export --app appname
  • distrobox upgrade --all

Those need to be done manually in toolbox

I have used silverblue and nodejs for full-time development for a few years now, and the most painless way IMO is with nvm

  1. Use the nvm install script.
  2. nvm install node
  3. confirm you have node with node -v.
  4. Just make sure you add the few magical lines to your vscode’s flatpak so that the VSCode’s developer shell can escape the sandbox and talk to your host system’s node/postgres/whatever!

I find nvm and such way easier for cli-tools, runtime management & local development than distrobox and toolbox - sue me.

PS: Optional - Instead of finding one-off install scripts you can install nvm, rvm, postgres, etc with Homebrew, which is adopted from macOS (also image-based nowadays). You can then do brew install nvm and brew install postgres etc.