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

Project Scaffolding (진행 중입니다. 완료되면 다시 정리할게요!) #2

Closed
wants to merge 33 commits into from

Conversation

YOOJS1205
Copy link
Collaborator

@YOOJS1205 YOOJS1205 commented Nov 12, 2023

다음과 같은 목차로 설명드릴게요.

  1. 진행한 것들
  2. 해결하지 못한 것들
  3. 앞으로 할 것들
  4. 확인해주셔야 할 것들

Scaffolding 진행 과정은 아래 링크로 follow up 가능합니다!
https://jundev.vercel.app/yarn-berry-github-actions-vercel-%EA%B8%B0%EB%B0%98-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-scaffolding

1. 진행한 것들

  • 핵심적으로 필요한 패키지들을 설치했습니다.
  // package.json
  "dependencies": {
    "@tanstack/react-query": "^5.8.2",
    "axios": "^1.6.1",
    "classnames": "^2.3.2",
    "next": "14.0.2",
    "react": "^18",
    "react-dom": "^18",
    "storybook": "^7.5.3"
  },
  "devDependencies": {
    "@types/node": "^18",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "@typescript-eslint/eslint-plugin": "^6.10.0",
    "@typescript-eslint/parser": "^6.10.0",
    "autoprefixer": "^10.0.1",
    "chromatic": "^9.0.0",
    "eslint": "^8",
    "eslint-config-next": "14.0.2",
    "eslint-config-prettier": "^9.0.0",
    "eslint-plugin-prettier": "^5.0.1",
    "eslint-plugin-react": "^7.33.2",
    "postcss": "^8",
    "prettier": "^3.0.3",
    "tailwindcss": "^3.3.0",
    "typescript": "5.2.2",
    "vercel": "^32.6.1"
  }
  • 기존 yarn classic 버전에서 node_modules로 관리하던 종속성을 pnp 방식으로 변경하였습니다.
# .yarnrc.yml
nodeLinker: pnp
  • 종속성들은 node_modules가 아닌 .yarn/cache 디렉토리에 zip 파일로 저장되고, 관리됩니다.

  • 또한, node_modules와 다르게 종속성 zip 파일들을 전부 원격 저장소로 push 합니다.
    image

  • zip 파일로 관리되지 않는 종속성들은 .yarn/unplugged 디렉토리에 들어가고, 초기 1회에 반드시 설치가 필요합니다. 운영체제에 종속된 패키지들이 있어서 사용자들마다 다르기 때문에 원격 저장소로 push 하지 않습니다.
    image

  • eslint와 prettier 아주 기초적인 설정만 하였습니다.

  • Tailwind CSS를 사용하기 위한 기본 설정 하였습니다.

/** src/styles/globals.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
  • Github Actions 사용해서 CI 설정하였습니다. 아래의 작업들을 수행합니다.
  1. 린트 체킹
  2. 빌드 테스트
  3. 피쳐 브랜치 기준 프리뷰 (Deploy Preview)
  4. main branch push 시 자동 배포

해당 작업들은 .github/workflows 디렉토리에서 확인 가능합니다. 또한, CI 작업은 Repository의 Actions 탭에서 확인 가능합니다.
image

2. 해결하지 못한 것들

  1. 프로젝트 클론 후 종속성 설치 시 checksum 문제 발생
    아래와 같이 임시적으로 해결은 했으나, 설치 시 매번 .yarn.lock 파일의 checksum 값들을 업데이트되는 이슈가 있습니다. 옳바른 방법이 맞는지 조금 더 찾아볼게요.
# .yarnrc.yml
checksumBehaviour: 'update'
  1. 프로젝트 클론 후 종속성 설치 시 unplugged 종속성 설치 실패 이슈
    swc와 같은 종속성들은 .zip파일로 관리되지 않는다는 에러가 뜨면서 설치가 실패합니다. yarn cache clean 명령어를 통해 캐시를 비우고 종속성을 재설치하면 작동은 하나, 해결해야 하는 문제입니다.

3. 앞으로 해야할 것들

  1. storybook
    -> 디자인 살살 나올 때에 같이 세팅하시죠 ㅎㅎ
  2. Vercel Deploy
    -> develop 브랜치의 용도를 같이 논의하고, main을 운영 환경, develop을 테스트 환경으로 나누어서 배포할지 결정이 필요합니다.
  3. api configuration
    -> 이번주 내로 진행하겠습니다.

4. 확인해주셔야 할 것들

여기가 핵심입니다!! 꼼꼼하게 확인해주시고 피드백 주세요!!

1. 프로젝트를 로컬로 클론하신 후, yarn 명령어를 통해 종속성 설치 시 어떠한 오류가 발생하는지 공유해주세요.

특히!! 예린님은 윈도우 환경에서 작업하시기 때문에 .yarn/unplugged 종속성 관련해서 어떠한 오류가 발생하는지 공유해주세요.

2. yarn cache clean 명령어를 통해 캐시를 비우시고, 종속성 재설치 시 바뀐 파일들을 공유해주세요.

특히, .yarn.lock 파일의 변화를 공유해주세요.

@YOOJS1205 YOOJS1205 self-assigned this Nov 12, 2023
@YOOJS1205 YOOJS1205 linked an issue Nov 12, 2023 that may be closed by this pull request
Copy link

vercel bot commented Dec 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
14th-team4-fe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 3:00pm
ddoeat-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 3:00pm

@vercel vercel bot temporarily deployed to Preview – 14th-team4-fe December 9, 2023 14:41 Inactive
@sjoleee
Copy link
Member

sjoleee commented Dec 12, 2023

아래와 같은 에러 발생 및 zip 1000개 이상 변경됩니다 ㅠㅜ

➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0013: │ scheduler@npm:0.23.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ resolve@npm:1.22.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:5.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:4.9.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ resolve@npm:2.0.0-next.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Libzip Error: Failed to open the cache entry for @esbuild/darwin-arm64@npm:0.18.20: Not a zip archive
    at Wr.makeLibzipError (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:12847)
    at new Wr (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:12288)
    at T (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3109)
    at /Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3173
    at Jx (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:390:11143)
    at Sg.factory (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3164)
    at get baseFs [as baseFs] (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:41188)
    at Sg.readFilePromise (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:38610)
    at So.readFilePromise (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:38617)
    at zA.loadFile (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:390:32591)
➤ YN0000: └ Completed in 36s 510ms
➤ YN0000: Failed with errors in 36s 710ms

@ddoeat
Copy link
Collaborator

ddoeat commented Dec 12, 2023

아래와 같은 에러 발생 및 zip 1000개 이상 변경됩니다 ㅠㅜ

➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0013: │ scheduler@npm:0.23.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ resolve@npm:1.22.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:5.2.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ typescript@npm:4.9.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ resolve@npm:2.0.0-next.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Libzip Error: Failed to open the cache entry for @esbuild/darwin-arm64@npm:0.18.20: Not a zip archive
    at Wr.makeLibzipError (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:12847)
    at new Wr (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:12288)
    at T (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3109)
    at /Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3173
    at Jx (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:390:11143)
    at Sg.factory (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:429:3164)
    at get baseFs [as baseFs] (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:41188)
    at Sg.readFilePromise (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:38610)
    at So.readFilePromise (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:314:38617)
    at zA.loadFile (/Users/sjoleee/programming/14th-team4-FE/.yarn/releases/yarn-3.6.4.cjs:390:32591)
➤ YN0000: └ Completed in 36s 510ms
➤ YN0000: Failed with errors in 36s 710ms

네엡 해당 사항 계속 확인중입니다. 공유 감사해요

@ddoeat ddoeat closed this Dec 13, 2023
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

Successfully merging this pull request may close these issues.

Project Scaffolding
3 participants