仮想計算機構

IT業界と無縁な派遣社員のブログ

【日記】Node.jsをインストールした

0.筆者の環境

OS : Windows 10
CPU : Intel Core i5 2.60GHz

1.下記サイトにアクセス。

ダウンロード | Node.js

2.Windowsインストーラーをダウンロードする。

f:id:riverta1992:20200627094412p:plain

3.インストーラーを起動。

f:id:riverta1992:20200627094608p:plain
これを進めていくと数分でインストール完了。

4.インストール完了の確認

VSCodePowershell からインストールがうまくいっているか確認する。

PS C:\Users\user> npm
npm : 用語 'npm' は、コマンドレット、関数、スクリプト ファイル、または操作可能なプログラムの名前として認識されません。名前が正しく記述されているこ
とを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行してください。
発生場所 行:1 文字:1
+ npm
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException     
    + FullyQualifiedErrorId : CommandNotFoundException

ダメっぽいので VSCode を閉じてもう一度トライ。

PS C:\Users\user> npm

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,  
    clean-install, clean-install-test, completion, config, 
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, fund, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\user\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@6.14.5 C:\Program Files\nodejs\node_modules\npm

うまくいったっぽい。