MirrorNest
← すべてのガイド

Node.js development environment on Windows

Install Node.js via a version manager (nvm-windows) rather than a single fixed installer -- lets you switch Node versions per project, matching what most real-world Node projects expect.

対象: Windows 10 2004+ or Windows 11DevelopmentProgramming公式ホームページ ↗公式ドキュメント ↗
このガイドは上記リンク先にあるNode.js development environment on Windows公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
  1. 1Install nvm-windows

    winget install --id CoreyButler.NVMforWindows -e

    This is a separate, Windows-specific project from the original Unix nvm -- Node's own official nvm doesn't support Windows directly.

  2. 2Install a Node version

    Open a new terminal (so PATH changes apply), then install and switch to an LTS release.

    nvm install lts
    nvm use lts
  3. 3Verify it

    node --version
    npm --version
  4. 4Switch versions per project as needed

    Handy when one project needs an older Node version than another -- no need to uninstall/reinstall.

    nvm list
    nvm use 18.20.4