7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nvmインストールからnodeインストールまで (mac)

Last updated at Posted at 2014-11-13

nvmインストール

$ brew install nvm
==> Downloading https://github.com/creationix/nvm/archive/v0.17.3.tar.gz
######################################################################## 100.0%
==> Caveats
Add the following to $HOME/.bashrc, $HOME/.zshrc, or your shell's
equivalent configuration file:

  source $(brew --prefix nvm)/nvm.sh

Node installs will be lost upon upgrading nvm. Add the following above
the source line to move install location and prevent this:

  export NVM_DIR=~/.nvm

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

インストール完了。試し。

npm -v
-bash: nvm: command not found

足りない。

echo "source \$(brew --prefix nvm)/nvm.sh" >> ~/.bash_profile

ターミナルを立ち上げ直して

npm -v
1.4.28

node -v
v0.10.33

いけました。

node install

nvm install v0.10
nvm alias default 0.10

これで使えるようになりました。
2つ目のコマンドを入れないとターミナルを再度立ち上げた時、
npmやnodeがcommand not foundになるようで、
再度「nvm use 0.10」とかやらないといけないようです。

7
6
0

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
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?