HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🌟
Programmers 최종 플젝 6조
/
[프론트] TWL
[프론트] TWL
/
Cache folder path is retrieved for npm but doesn't exist on disk: /home/runner/.npm
Cache folder path is retrieved for npm but doesn't exist on disk: /home/runner/.npm
Cache folder path is retrieved for npm but doesn't exist on disk: /home/runner/.npm

Cache folder path is retrieved for npm but doesn't exist on disk: /home/runner/.npm

생성일
Dec 15, 2021 04:04 PM
태그
Git
GitHub Action
Issue
CI
작성자
해결 완료
해결 완료

🔥 문제

name: CI-front on: push: branches: [ develop, main ] pull_request: branches: [ develop, main ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install a project with a clean slate run: rm -rf node_modules && yarn install --frozen-lockfile - name: Lint run: npm run lint - uses: actions/checkout@v2 - name: Install Dependencies working-directory: ./ run: yarn install - name: Build ReactJS env: CI: false working-directory: ./ run: yarn run build - name: Login to DockerHub uses: docker/login-action@v1.8.0 with: username: ${{ secrets.DOCKERHUB_FRONT_USERNAME }} password: ${{ secrets.DOCKERHUB_FRONT_PASSWORD }} - name: Build and push Docker images uses: docker/build-push-action@v2.4.0 with: context: . file: Dockerfile push: true tags: ${{ secrets.DOCKERHUB_FRONT_USERNAME }}/kazedon_fe:latest
 

⭐ 해결 방법

먼저 중복되는 해당 커맨드를 지웠다.
- name: Install Dependencies working-directory: ./ run: yarn install
 
또한, 잘 살펴보면 npm으로 되어 있는 부분을 확인할 수 있다.
steps: - name: Check out repository uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} cache: 'npm' - name: Install a project with a clean slate run: rm -rf node_modules && yarn install --frozen-lockfile - name: Lint run: npm run lint
이를 모두 yarn으로 대체한다.
결국 핵심은, npm을 최대한 쓰지 않고 yarn으로 대체한다는 것이었다.
steps: - name: Check out repository uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} cache: 'yarn' - name: Install a project with a clean slate run: rm -rf node_modules && yarn install --frozen-lockfile - name: Lint run: yarn run lint

결과

TLVB-129의 이슈를 보면, 결국 잘 린트 검사를 통과했다!
 
 

👏🏻 참고자료