Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.jsのセットアップ方法(Mac) #5

Open
Ayako-T opened this issue Dec 14, 2021 · 7 comments
Open

Node.jsのセットアップ方法(Mac) #5

Ayako-T opened this issue Dec 14, 2021 · 7 comments
Assignees

Comments

@Ayako-T
Copy link
Contributor

Ayako-T commented Dec 14, 2021

Node.jsをMacOSにインストールする

@Ayako-T Ayako-T changed the title Node.jsのセットアップ方法(Mac) Node.jsのセットアップde(Mac) Dec 14, 2021
@Ayako-T Ayako-T changed the title Node.jsのセットアップde(Mac) Node.jsのセットアップ方法(Mac) Dec 14, 2021
@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

homebrewを使ってインストールをする
このサイトを参考にする
https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

nodebrew install-binary stableのコマンドを実行するとエラーが出てしまった
image

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

以下のコマンドを実行して、nodebrew用のディレクトリを作った
mkdir -p ~/.nodebrew/src

image

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

インストールすることができた
image

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

インストールされたnode を有効化する
nodebrew lsで ”current: none"であることを確認し、必要なバーションを有効化する
image

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

環境パスを通す
以下のコマンドを実行し、ターミナルを再起動する
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile

@Ayako-T
Copy link
Contributor Author

Ayako-T commented Dec 14, 2021

nodeが使えるかを下記のコマンドで確認する

node -v
先程有効化したバージョンが表示されたので、完了
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant