lighthouse-ci icon indicating copy to clipboard operation
lighthouse-ci copied to clipboard

LHCI Server - Problem running lhci wizard

Open carlosviniciusananias opened this issue 2 years ago • 0 comments

Description

After performing all necessary configurations and creations lhci server I get an error when executing lhci wizard. I tried to use node version 12 and also version 14. I was not successful.

My heroku application has been created. https://whispering-spire-97575.herokuapp.com/

Can anyone support me? I think this problem may be associated with node versions, but I'm not sure.

Heroku is running my app.

image

My workflow:

name: Build project and run Lighthouse CI

on:
  pull_request:
    branches:
      - develop
      - main

jobs:    
  lhci:
    name: Lighthouse CI
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js 12.x
        uses: actions/setup-node@v2
        with:
          node-version: 12
      - name: npm install
        run: |
          npm install

      - name: run Lighthouse CI
        run: |
          npm install -g @lhci/[email protected]
          lhci autorun || echo "LHCI failed!"

        env:
          LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
          LHCI_SERVER_BASE_URL: ${{ secrets.LHCI_SERVER_BASE_URL }}
          LHCI_LHCI_TOKEN: ${{ secrets.LHCI_LHCI_TOKEN }}

My lighthouserc.js:

module.exports = {
  ci: {
    collect: {
      settings: {
        chromeFlags: "--no-sandbox",
      },
      numberOfRuns: 3,
      url:[ "my-website"],
    }, 
    assert: {
      preset: "lighthouse:recommended",
      assertions: {
        "uses-rel-preload": "off",
        "uses-rel-preconnect": "off",
      },
    },
    upload: {
      target: "lhci",
      serverBaseUrl: process.env.LHCI_SERVER_BASE_URL,
      token: process.env.LHCI_HEROKU_TOKEN, // could also use LHCI_TOKEN variable instead 
    },
  },
};

Evidence

image image image

carlosviniciusananias avatar May 24 '22 02:05 carlosviniciusananias