DEV Community

Heitor Ramon Ribeiro
Heitor Ramon Ribeiro

Posted on

4 1

Node, NPM, Yarn & NVM

Now it's time to start configuring our development environment. A good node.js is crucial as a primarily JavaScript developer, and it is vital to make sure it's working well.

NVM

There is no better way to manage node than using NVM

# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

Updating NVM

To update NVM to a newer version, you can use this command without losing your globals. Remember to change <version> to the version you want installed.

nvm install <version> --reinstall-packages-from=$(nvm current)
nvm use <version>
nvm alias default <version>
Enter fullscreen mode Exit fullscreen mode

Yarn

I prefer to use Yarn as the package manager, but this is a personal selection.

# Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

NPMJS.com

Set the defaults value for your NPM user

npm set init.author.name "your name"
npm set init.author.email "you@example.com"
npm set init.author.url "example.com"
Enter fullscreen mode Exit fullscreen mode

Then login into NPM with

npm adduser
Enter fullscreen mode Exit fullscreen mode

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❀ or a friendly comment on this post if you found it helpful!

Okay