LoginSignup
0
0

More than 3 years have passed since last update.

Nuxt.jsの環境構築してみた!

Posted at

きっかけ

先日のボーナスで欲しかったMacbookを買いました。
元々はiOSアプリの勉強と思って購入しましたが、
興味のあったNuxt.jsで何かアプリ作ってみよう、ということでまずは環境構築から!!

準備

Nuxt.jsを動かす

まずnuxtのプロジェクト作成コマンドを叩くためのNpmを入れる。
以下の手順で構築する
1. Command Line Tools

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

brew -v でバージョン確認出来たらOK!

  1. Nodebrew install
$ brew install nodebrew

nodebrew -vでバージョン確認出来たらOK!

  1. Node.jsとNpm install
# このディレクトリを作っておかないとエラーになる
$ mkdir -p ~/.nodebrew/src

# latestは最新版という意味
$ nodebrew install-binary latest

# インストールした後で使用を宣言
$ nodebrew use latest

#パスを通す
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
$ source ~/.bash_profile

Nuxt.jsのプロジェクトを作成して、動かす

以下のコマンドで作成

$ npx create-nuxt-app <project-name>

動作確認

$ cd <project name>
$ npm run dev

できた!

スクリーンショット 2020-12-23 21.14.22.png

次回からはTODOリスト作成を進めてきます!

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