Github actions error- Error: Process completed with exit code 127

25.6k Views Asked by At

Please, help me resolve this issue: I'm running GitHub actions with custom runners, when I changed from ubuntu latest to self-hosted, I started getting this error.

Run terraform init /usr/bin/env: node: No such file or directory Error: Process completed with exit code 127.

1

There are 1 best solutions below

0
On

I had a few issues in my case.

  1. I removed the test because they were "not found" error 127.
  2. There are over 10,000 files in this artifact, consider creating an archive before upload to improve the upload performance.
  3. I had to update npm run build -- --configuration production I was using --prod and it was deprecated.

I forgot to add the following. This will speed up the build.

  # This is your build stage
  - name: npm install, build, and test
    run: |
      npm install
      npm run build --if-present
      npm run test --if-present

  - name: Zip artifact for deployment
    run: zip release.zip ./* -r

  - name: Upload artifact for deployment job
    uses: actions/upload-artifact@v2
    with:
      name: node-app
      path: release.zip
  
  # This is your deploy stage
  steps:
  - name: Download artifact from build job
    uses: actions/download-artifact@v2
    with:
      name: node-app
      
  **- name: unzip artifact for deployment
    run: unzip release.zip**

  - name: 'Deploy to Azure Web App'
    id: deploy-to-webapp
    uses: azure/webapps-deploy@v2
    with:

Hopefully this helps.