menu
Anh-Thi DINH
In this post
  1. Docs
  2. Articles
  3. Installation

Gatsby 1

Posted on 31/10/2018, in Web development.

This note contains all my remarks for using GatsbyJS. I wanna find a better solution for jekyll websites. I come to this framework because of this comparison post.

tocIn this post

Docs

Articles

Installation

  • npm is the package manager for JavaScript and the world’s largest software registry
    • Install NodeJS (with npm) (check this for other methods)
      sudo apt-get update
      sudo apt-get install nodejs
      
    • Check the current version: npm -v (for npm) and node -v (for nodejs)
  • Check version for gatsby: gatsby -v
  • Install: npm install --global gatsby-cli
  • If error EACCES occurs,
    • Create a new folder by: mkdir ~/.npm-global
    • Open ~/.profile
    • Add following lines to this file
      npm config set prefix '~/.npm-global'
      export PATH=~/.npm-global/bin:$PATH
      
    • Save the file and then run (if you don’t restart the computer, do the same below work for new tab of terminal): source ~/.profile.
  • Install new site
    gatsby new gatsby-site
    
  • Run the site: gatsby develop and then browse http//localhost:8000
Top