DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
What's in store for DevOps in 2023? Hear from the experts in our "DZone 2023 Preview: DevOps Edition" on Fri, Jan 27!
Save your seat
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Setting Up a Dev Machine for Node.js

Setting Up a Dev Machine for Node.js

Node.js has quickly become one of the most popular frameworks for backend web development. Read on to learn how to set it up on your development machine.

Adron Hall user avatar by
Adron Hall
CORE ·
Jul. 23, 18 · Tutorial
Like (5)
Save
Tweet
Share
6.29K Views

Join the DZone community and get the full member experience.

Join For Free

It seems every few months setup of whatever tech stack is always tweaked a bit. This is a collection of information I used to setup my box recently. First off, for the development box, I always use nvm as it is routine to need a different version of Node.js installed for various repositories and such. The best article I've found that is super up to date for Ubuntu 18.04 is Digital Ocean's article (kind of typical for them to have the best article, as their blog is exceptionally good). In it, the specific installation of nvm I've noticed has changed since I last worked with it some many months ago.

First, curl download the installation script (I'm pretty sure this is often used to just execute the script, which isn't something that should be standard practice - don't just execute scripts from repos on the internet!).

curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh -o install_nvm.sh

Then execute the script. Review it first if you'd like, ya know, to make sure another npm credentials nightmare or something isn't about to occur!

bash install_nvm.sh

Now that I've gotten the script and run it, I can then source ~/.profile and nvm is now available. Check out the versions available for installation with nvm ls-remote. Next up, install a particular version or a few; in my case, I'll need a couple.

nvm install 6
nvm install 8.11.3

After this, I ran a nvm ls command to see what was installed altogether. Note for my installation of version 6, with the nvm install 6 command, it chose version 6.14.3, as it will choose the latest iteration for any major release version specified.

Beyond the version manager installed version, there's also the package manager on Debian/Ubuntu that can be used, but this requires a few additional steps; but it is good if the installation will be used to host a specific Node.js application at a particular version. More details on that installation method can be found here.

For more, follow me @Adron on twitter, @Adron on Github, and subscribe to my blog at https://compositecode.blog.

Node.js Machine dev

Published at DZone with permission of Adron Hall, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Complete Guide to AngularJS Testing
  • Using the PostgreSQL Pager With MariaDB Xpand
  • Understanding gRPC Concepts, Use Cases, and Best Practices
  • Web Application Architecture: The Latest Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: