Learn

Node.js 설치하기

Node.js가 뭔지, 어떻게 설치하는지, 그리고 왜 패키지 매니저 설치 전에 필요한지.

Node.js는 브라우저 밖에서 JavaScript 코드를 실행하는 인터프리터예요. 전체 생태계의 첫 번째 필수 조건이에요 : Node 없이는 npm도, pnpm도, bun도 작동하지 않아요(bun은 부분적인 예외인데, 나중에 다뤄요).

공식 설치 프로그램을 쓰지 않는 이유

nodejs.org 사이트에서 .msi(Windows) 또는 .pkg(macOS) 파일을 제공해요. 간단하지만 버전이 하나로 고정돼요. 실제로는 서로 다른 버전의 Node가 필요한 여러 프로젝트를 다루게 돼요. 버전 매니저를 사용하면 명령어 하나로 버전을 전환할 수 있어요.

fnm 설치하기 (권장, 크로스 플랫폼)

fnm(Fast Node Manager)은 Rust로 작성되었어요. 빠르고 Windows, macOS, Linux에서 모두 작동해요.

macOS / Linux:

shell
curl -fsSL https://fnm.vercel.app/install | bash

Windows (PowerShell):

shell
winget install Schniz.fnm

Chocolatey 사용:

shell
choco install fnm

Scoop 사용:

shell
scoop install fnm

fnm을 설치한 후, 최신 LTS 버전의 Node를 설치해요:

shell
fnm install --lts

활성화:

shell
fnm use lts-latest

nvm 설치하기 (macOS / Linux 전용)

macOS 또는 Linux에서 nvm을 선호한다면:

shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

그 다음:

shell
nvm install --lts
shell
nvm use --lts

설치 확인하기

설치 후, 새 터미널을 열고 확인해요:

shell
node --version
shell
npm --version

두 개의 버전 번호가 보여야 해요. node 명령어를 찾을 수 없다면, 터미널을 닫고 다시 열어보세요(환경 변수는 현재 세션에서 자동으로 다시 로드되지 않아요).

LTS 버전 선택하기

Node는 주요 버전 릴리즈 주기를 따라요. LTS(Long Term Support) 버전은 30개월 동안 보안 패치를 받아요. 프로덕션과 학습에는 이 버전을 사용하세요.

2026년 5월 기준, 현재 LTS는 Node 22예요.

Node.js 릴리즈 일정 fnm GitHub

Concepts-ponts

Concept-pont · Node.js, prérequis runtime de l'écosystème JS

Beaucoup d'outils (Claude Code CLI, pnpm, bun, Next.js) supposent Node installé. Ici on enseigne comment, là on l'utilise.

다음 단계를 열려면 단계를 체크하세요

코스로 돌아가기