Skip to content

Postinstall patch fails on GitHub Actions #88

@gp42

Description

@gp42

Problem

When installing @mondaycom/apps-cli on GitHub Actions, the postinstall patch of parse-gitignore package fails. I assume this happens because of hard coded path of node_modules location in the patch (but i mat be wrong).

How to Reproduce

GitHub Action

jobs:
  build:
    runs-on: ubuntu-latest
    name: Build
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - uses: actions/setup-node@v4
        with:
          node-version: 18.19.1

      - name: Install
        run: |
          npm i

This fails after installation:

npm ERR! code 1
npm ERR! path /home/runner/work/XXX/node_modules/@mondaycom/apps-cli
npm ERR! command failed
npm ERR! command sh -c patch-package
npm ERR! patch-package 8.0.0
npm ERR! Applying patches...
npm ERR! Error: Patch file found for package parse-gitignore which is not present at node_modules/parse-gitignore
npm ERR! ---
npm ERR! patch-package finished with 1 error(s).
npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2024-02-27T22_24_[43](https://github.com/gp42/XXX/actions/runs/8072172997/job/22053350480#step:5:44)_979Z-debug-0.log

Workaround

As a workaround it is possible to do the following:

      - name: Install and build
        run: |
          npm i --ignore-scripts @mondaycom/apps-cli
          npm i

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions