First beta version overhauls the installation procedures

Jun 27, 2015 09:35 GMT  ·  By

Node's package manager, npm, has released its first major version of the 3.x branch, and it comes with a few big changes to the way it looks and its installation routine.

As the team notes in its release announcement, "npm@3 constitutes a nearly complete rewrite of npm's installer to be easier to maintain, and to bring a bunch of valuable new features and design improvements to you all."

npm 3 looks different when installing packages

The first thing you'll notice about the new npm 3.x is a change in npm's installation procedure, with the rotating preloader being replaced by a horizontal progress bar.

This will let developers know how much a package might sometimes take to install and will allow them to focus on other jobs in the meantime, without wasting any more time staring at the screen.

The new npm 3 progress bar is Unicode-based, and if the proper version of Unicode is not found, a non-Unicode progress bar will be shown instead.

At the end of the installation procedure, npm 3 will additionally display a module dependency tree, highlighting newly installed packages using a yellow-orange color, and pre-existing packages using white.

Changes have also been made to the way npm works

Compared to the 2.x branch, npm 3 also uses a different installation procedure, working as a multi-stage installer, deploying multiple packages at once, thus reducing the user's overall waiting time.

As you'll be using it more and more, you'll also notice more and more modules popping up in your "/node/node_modules" folder, even if you installed way less. This is because npm 3 now stores all packages using a flat directory structure, instead of a classic nested tree.

This means that all the module dependencies of "package X" will be shown on the same level with the "package X" folder in the "/node/node_modules" directory, instead of being nested inside it.

If situations occur where modules have conflicting dependencies, nested folders will be used to hold different versions of the same module.

To update to the latest 3.x version and give it a spin yourself, use the following command in your Node console:

code
npm install -g [email protected]
Progress bars were added to the package installation procedure
Progress bars were added to the package installation procedure

The new npm 3 package installation screen (3 Images)

First npm 3.0 Beta is out
Progress bars were added to the package installation procedureA color-highlighted package dependency tree is also shown at the end
Open gallery