What is the recommended practice to install npm in Bluefin-DX?

Shall we install npm with?

Option 1
rpm-ostree install npm

or

Option 2
brew install npm

I am guessing it is Option 2 to minimize changes on the OS. Is that correct?

EDIT:
Option 3
Install via a distrobox container.

I am asking because I want to install the Dev Container CLI in the host, but it requires npm

1 Like

brew install npm is what we recommend.

If you’re using it for development then whichever container people use, the docker image seems to be popular:

1 Like

Thanks @j0rge!

I did install it with

       brew install npm

Afterwards, I installed devcontainers with:

      npm install -g @devcontainers/cli

Against intuition, it will run from the terminal with

      devcontainer

instead of devcontainers.

PS. Here is a very gentle introduction to the use of Dev Containers:

I just tried it in Bluefin-DX and works great!

Takeaway

  1. No dependencies clash. npm and devcontainer install with no issues.
  2. In a standard mutable OS such as Ubuntu 22.04. I would have to go through the pains of several pre-requisite packages. Not the case with Bluefin-DX batteries -included approach.

Thanks for the docker image link.
I forgot that Bluefin-DX comes with docker pre-installed.

Yeah you can also brew install devcontainer if you prefer to do that. We have an issue open for putting devcontainer on the image, do you think we should include it ootb? I’m leaning towards yes.

2 Likes

Is not easier to use devcontainers in vscode ?

Still slowly learning devcontainers. It isn’t installed by default in Bluefin-DX. That’s why I had to install it first.

I think the best and fastest way is what @j0rge recommends because npm and node are taken care of by brew.

brew install devcontainer

PS. Before starting the installation better to assign r/w rights to the user in brew with:

sudo chown -R $(whoami) /home/linuxbrew