nizarmah / auto-minify

Minifies JS and CSS files in GitHub workflows.
GNU General Public License v3.0
48 stars 18 forks source link

Help with an error #28

Open stretch07 opened 2 years ago

stretch07 commented 2 years ago

I keep receiving this error halfway through the build: image

Here's my yml setup:

name: Auto Minifier CSS

on: push

jobs:

  build:
    runs-on: ubuntu-latest

    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2
      - name: Auto Minify
        uses: nizarmah/auto-minify@v2.1.1
        with:
          overwrite: false
          directory: .
          maxdepth: 20
      - name: Auto commit minified files
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: "Github Action: Auto Minified JS and CSS files"
          branch: ${{ github.ref }}

Could somebody diagnose?

nizarmah commented 8 months ago

Hey @stretch07. Are you still running into this issue?

If so, can you create a small publicly available "demo"? It will help me understand what's happening.

AutisticShark commented 4 months ago

https://github.com/babel/minify/issues/974 Maybe related to this? I also started to get this error in my CI after moving some script content inside the HTML template to a dedicated JS file, could it be that bable doesn't like that?

AutisticShark commented 4 months ago

Fixed by switching to uglify-js as js engine.

nizarmah commented 4 months ago

Nice catch! You're awesome, @AutisticShark. Thank you 🙌🏼

It seems like there's a work-around. I'll try to include that over the weekend.

stretch07 commented 4 months ago

I'm glad you guys found a fix. Feel free to close this issue whenever you need