기타

Gatsby로 포토폴리오 만들기 - (1)

알면 알 수록 재밌다! 2023. 3. 7. 07:00

우선 시작하자마자 에러를 폭탄맞았다.

 

sudo chown -R 501:20 "/Users/ijihun/.npm"
sudo npm i -g gatsby-cli

 

만약 gatsby 설치시 에러가 나온다면 캐시를 지우던 권한을 주던 하면 된다.

git clone https://github.com/gatsbyjs/Gatsby-starter-blog.git my-blog
cd my-blog
npm i
npm run start

클론을 받고 시작을 해보자.

 

http://localhost:8000/

아주 못생긴 사이트가 나왔다.

 

 

이제 이쁜 템플릿을 다운받아서 사용해보자.

npm install -g gatsby-cli
gatsby new portfolio-minimal github_link
cd portfolio-minimal
gatsby develop
Failed tasks: - demo:start Hint: run the command with --verbose for more details.


그리고 sharp 에러도 났다.
The sharp documentation provides instructions for building libvips from source on various platforms, including macOS. 란다.
brew install pkg-config glib zlib
brew install libjpeg-turbo libpng webp
brew install vips
npm install
npm run start
 http://localhost:9000/

드디어 해결~~

 

페이지가 보인다.

이제 이걸로 내 포토폴리오 사이트를 만들고자 한다