0
0

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.

Node.jsインストール してみた

Last updated at Posted at 2019-03-04

nodebrewでnode.jsをインストールしたけど三秒で終わらなかった時のメモ....φ(・ω・` )

#手順
1.Homebrewのインストール
2.nodebrewのインストール
3.node.jsのインストール
4.有効化
5.パスを通す
#Homebrewのインストール

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

#nodebrewのインストール

brew install nodebrew

#node.jsのインストール
最新を入れる

nodebrew install-binary latest

ちなみに安定はstable

Fetching: https://nodejs.org/dist/v11.10.1/node-v11.10.1-darwin-x64.tar.gz
Warning: Failed to create the file                                             
Warning: /Users/Morico/.nodebrew/src/v11.10.1/node-v11.10.1-darwin-x64.tar.gz: 
Warning: No such file or directory
                                                                            0.0%
curl: (23) Failed writing body (0 != 846)
download failed: https://nodejs.org/dist/v11.10.1/node-v11.10.1-darwin-x64.tar.gz

フォルダがないので失敗したらしい

mkdir ~/.nodebrew/src

再度、nodebrew install-binary latestで
######################################################################### 100.0%
Installed successfully

nodebrew ls 

v11.10.1

current: none

#有効化

nodebrew use v11.10.1

nodebrew ls

v11.10.1

current: v11.10.1

まだしかし、現状だと
node -v
とかしてもcommand not foundが表示されるだけなので

#パスを通す

export PATH=$PATH:~/.nodebrew/current/bin

上記を.bashrcとかに追記して
source .bashrcで読み込めば

node -v

v11.10.1

以上(2019-03-04)

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?