#author("2019-04-09T16:58:33+09:00","default:ryuichi","ryuichi")
#author("2019-04-09T17:00:48+09:00","default:ryuichi","ryuichi")
* node_modules以下の.binをパスに加える [#v4123bb6]

** PowerShell [#cc327f1f]

 $env:path = ".\node_modules\.bin;" + $env:path # 一時的に設定する

 notepad.exe $profile # 常にパスの設定を有効にするなら、上の内容をプロファイルに記述する


*** パスが通っているか確認する [#j090efdd]

 npm install foo # 適当なパッケージをインストールして、
 get-command foo # node_modules\.binにインストールされたコマンドのパスを確認する

** 環境変数 - Windows [#l6abe629]

- WIN+Rキーを押下して、sysdm.cplと入力し、システムのプロパティを開く。
- ユーザー環境変数PATHに.\node_modules\.binを追加する。
- なお、ユーザー環境変数の操作はPowerShellでも可能だが、間違いやすいのでコントロールパネル経由の方が無難。

*** 参考 [#id667bf9]

https://stackoverflow.com/questions/573817/where-are-environment-variables-stored-in-registry



** 参考 [#i960a65d]

https://superuser.com/questions/392271/prepend-to-path-variable-windows

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS