LoginSignup
114
109

More than 3 years have passed since last update.

Node.js と npm インストールとアップデート

Last updated at Posted at 2016-10-30

Node.js をバージョン管理するには nodebrew や nvm などがありますが、
今回は n を使って環境を作りたいと思います。

Node.js と npm インストール

Mac の場合

$ brew install node

CentOS の場合

$ yum install gcc gcc-c++
$ yum install nodejs npm –enablerepo=epel

n のインストール

$ npm install -g n

n を使って node.js のアップデート

$ n --stable
$ n --latest
$ n latest

npm のアップデート

$ npm update -g npm
$ npm update -g
$ npm outdated -g

こんな感じでJSが動く

$ node -v
v7.0.0

$ node
> console.log(“hello world”)
hello world

これでバリバリ開発していきましょう。
自分の技術ブログからの転載ですがQiita初投稿しました。
http://jaxx2104.info/node-js-install-update

今後はこちらに書いていくのでよろしくお願いします。

114
109
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
114
109