LoginSignup
0
1

More than 5 years have passed since last update.

【入門メモ】node.jsのインストールからgoogle-home-notifierのインストールまで

Posted at

前提

新調したMacbookなのでnodeとか何も入っていない状態。

$ node

のコマンドで何も反応がないのも確認済み。

nodebrewのインストール

まずはnodebrewのインストール。

$ brew install nodebrew

nodebrewは~/.nodebrewにインストールされます。
私毎回忘れて後から怒られるのですが、pathを通しましょう。

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

nodebrew commandが動けばインストールは完了。

$ nodebrew help

node.jsのインストール

まずはインストールできるnode.jsのversionを確認

$ nodebrew ls-remote

ずらりとバージョンが出てくるのでStableになっている最新バージョンをインストール。

$ nodebrew install-binary stable

v9.2.1だった。(2017/12/12現在)

インストールが完了したら、使いたいバージョンを利用するように設定。

$ nodebrew ls
v9.2.1

current: none

currentに出てくるのが、現在利用中のバージョン。
まだ、インストールしただけでnoneになっているので、使いたいバージョンをcurrentにすれば、完了。

$ nodebrew use v9.2.1
$ node -v
v9.2.1

npmでパッケージをインストール

npm install -g

$ npm install -g grunt-cli

npm init

$ npm init

npm install --save-dev

$ npm install --save-dev grunt

npm install

$ npm install

ここまできてやっとgoogle-home-notifierのインストールです。

google-home-notifierのインストール

$ # google-home-notifierを入れる
$ npm install google-home-notifier

$ # yarn の方は下記のように
$ yarn add google-home-notifier

なんとか設定が完了したので次はサンプルコードで喋らせて見たり遊んで見ます。

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