Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI action uses Node.js 18 #1080

Open
ai opened this issue Jul 2, 2024 · 0 comments
Open

CI action uses Node.js 18 #1080

ai opened this issue Jul 2, 2024 · 0 comments

Comments

@ai
Copy link
Contributor

ai commented Jul 2, 2024

Hi. Thanks for amazing tool for Browserslist ecosystem. I as Browserslist author like it a lot.

But I have some strange issue with it. In our case CI action uses Node.js 18 and CI fails (since we have engine: { node: ">=20" }.

But looks like you are using Node.js 20.

Our config:

name: Update target browsers
on:
  schedule:
    - cron: "0 2 1 * *"
permissions:
  contents: write
  pull-requests: write
jobs:
  update-browserslist-database:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Configure git
        run: |
          git config --global user.email "[email protected]"
          git config --global user.name "GitHub Action"
      - name: Check Browserslist database
        uses: c2corg/browserslist-update-action@v2
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: browserslist-update
          base_branch: master
          commit_message: Update Browserslist DB
          title: Update Browserslist DB

The log:

Run c2corg/browserslist-update-action@v2
Check if there is a branch and a matching PR already existing for caniuse db update
/usr/bin/git rev-parse --abbrev-ref HEAD
master
Create new branch browserslist-update
/usr/bin/git checkout -b browserslist-update
Switched to a new branch 'browserslist-update'
/usr/local/bin/npx update-browserslist-db@latest
npm warn exec The following package was not found and will be installed: [email protected]
Latest version:     1.0.30001639
Installed versions: 1.0.30001614, 1.0.30001625, 1.0.30001629
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ yarn add -W caniuse-lite
error: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.20.3"

Maybe Node.js 20 version was not released? Or maybe you forget to update v2 tag to v2.4.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant