nvm環境を構築する

brew update

brew install nvm

~ % nvm –version

zsh: command not found: nvm

なぜなのか、不明だが下記コマンドで詳細を確認できるらしい

brew info nvm

~ % brew info nvm

brew info nvmnvm: stable 0.37.2, HEAD

Manage multiple Node.js versions

https://github.com/nvm-sh/nvm

/usr/local/Cellar/nvm/0.37.2 (7 files, 171.2KB) *

Built from source on 2021-03-06 at 00:22:41

From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nvm.rb

License: MIT

==>Options

–HEAD

Install HEAD version

==>Caveats

Please note that upstream has asked us to make explicit managing

nvm via Homebrew is unsupported by them and you should check any

problems against the standard nvm install method prior to reporting.

You should create NVM’s working directory if it doesn’t exist:

mkdir ~/.nvm

Add the following to ~/.zshrc or your desired shell

configuration file:

export NVM_DIR=”$HOME/.nvm”

[ -s “/usr/local/opt/nvm/nvm.sh” ] && . “/usr/local/opt/nvm/nvm.sh”# This loads nvm

[ -s “/usr/local/opt/nvm/etc/bash_completion.d/nvm” ] && . “/usr/local/opt/nvm/etc/bash_completion.d/nvm”# This loads nvm bash_completion

You can set $NVM_DIR to any location, but leaving it unchanged from

/usr/local/opt/nvm will destroy any nvm-installed Node installations

upon upgrade/reinstall.

Type `nvm help` for further information.

==>Analytics

install: 46,413 (30 days), 132,410 (90 days), 473,238 (365 days)

install-on-request: 46,392 (30 days), 132,303 (90 days), 469,913 (365 days)

build-error: 0 (30 days)

You should create NVM’s working directory if it doesn’t exist:

NVMの作業ディレクトリが存在しない場合作る必要がある

mkdir ~/.nvm

ディレクトリをホームに作成する

 

とりあえずLTSをインストール

nvm install 14.16.0

Version ‘14.16.0’ not found – try `nvm ls-remote` to browse available versions.

nvm ls-remoteしてねいうから、してみる

nvm ls-remote

            N/A

なんだこれ

export NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist
をbash_profileに追加する

git clone git://github.com/creationix/nvm.git ~/.nvm
リポジトリ持ってくる

nvm install v14.16.0

yagidaisuke@yagidaiukenoAir .nvm % nvm ls              

       v0.10.48

->     v14.16.0

default -> v0.10 (-> v0.10.48)

iojs -> N/A (default)

unstable -> N/A (default)

node -> stable (-> v14.16.0) (default)

stable -> 14.16 (-> v14.16.0) (default)

lts/* -> lts/fermium (-> v14.16.0)

lts/argon -> v4.9.1 (-> N/A)

lts/boron -> v6.17.1 (-> N/A)

lts/carbon -> v8.17.0 (-> N/A)

lts/dubnium -> v10.24.0 (-> N/A)

lts/erbium -> v12.21.0 (-> N/A)

lts/fermium -> v14.16.0

 

vue create アプリ名

cd アプリ名

npm i

npm run serve