Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

554
Vistas
error An unexpected error occurred: "EACCES: permission denied in github actions

Today when I run the yarn command in github actions, shows error like this:

Run rm -rf node-modules
yarn install v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error An unexpected error occurred: "EACCES: permission denied, unlink '/home/runner/work/react-admin/react-admin/node_modules/.yarn-integrity'".
info If you think this is a bug, please open a bug report with the information provided in "/home/runner/work/react-admin/react-admin/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

I have already tried to delete the node_modules folder, by the way, the github actions virtual machine is new and did not contains the node_modules folder originally. what should I do to fix this problem? this is my github workflow define:

name: management-system-pro-umi

on:
  push:
    branches: [ umi ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Install yarn
        uses: borales/actions-yarn@v2.1.0
        with: 
         cmd: install
      - name: Build React App
        run: | 
          rm -rf node_modules
          yarn
          umi build

      - name: Build image push to aliyun
        uses: docker/build-push-action@v1
        with:
          registry: ${{ secrets.ALI_DOCKER_HUB_REGISTRY }}
          username: ${{ secrets.ALIYUN_DOCKER_REPO_USER_NAME }}
          password: ${{ secrets.ALIYUN_DOCKER_REPO_USER_PASSWORD }}
          tags: ${{ github.sha }}
          repository: reddwarf-pro/react-admin-new
          path: '.'
    
       # https://github.com/steebchen/kubectl
      - name: deploy to cluster
        uses: steebchen/kubectl@v2.0.0
        with: # defaults to latest kubectl binary version
          config: ${{ secrets.KUBE_CONFIG_DATA }}
          command: set image --record deployment/react-admin-new react-admin=registry.cn-hangzhou.aliyuncs.com/reddwarf-pro/react-admin-new:${{ github.sha }} -n reddwarf-pro

      - name: verify deployment
        uses: steebchen/kubectl@v2.0.0
        with:
          config: ${{ secrets.KUBE_CONFIG_DATA }}
          version: v1.21.0 # specify kubectl binary version explicitly
          command: rollout status deployment/react-admin-new -n reddwarf-pro

I have read some other question, the all facing the problem in local machine. In the github actions virtual machine, when run into the yarn command, the error occured.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I read the official docs and found this:

Please keep in mind that this Action was originally written for GitHub Actions beta (when Docker was the only way of doing things). Consider using actions/setup-node to work with Yarn. This repository will be mostly supporting the existing flows.

so I changed to use actions/setup-node repo, and do it like this:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: 16
      - run: npm install yarn -g
      - name: Build React App
        run: | 
          yarn
          yarn global add umi
          umi build

fixed it.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda