DEV Community

Yuki Nagae
Yuki Nagae

Posted on

7

"asdf" multiple runtime version manager to install node.js

asdf is a runtime version management tool. It is similar to other tools such as rbenv (for ruby), nvm (for node), goenv (for golang).

Those tools focus on one language runtime, on the other hand asdf covers most of those language runtimes. Using asdf, you don't have to install each runtime version manager tool one by one, just asdf is enough.

Install asdf via brew:

brew install asdf
Enter fullscreen mode Exit fullscreen mode

Add node.js plugin for asdf:

asdf plugin-add nodejs
Enter fullscreen mode Exit fullscreen mode

Install node.js latest version and set it on a global context:

asdf install nodejs latest
asdf global nodejs
Enter fullscreen mode Exit fullscreen mode

You can specify a version instead of "latest":

asdf install nodejs 19.3.0
Enter fullscreen mode Exit fullscreen mode

Check node.js and npm versions (versions depend on your environment):

$ node -v
v19.3.0
$ npm -v
9.2.0
Enter fullscreen mode Exit fullscreen mode

That's all!

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay