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

Getting unexpected token in JSON position 0 when passing configPath #87

Closed
bradtaniguchi opened this issue Jul 7, 2021 · 1 comment
Closed

Comments

@bradtaniguchi
Copy link

I've been continuously getting the same error when trying to run this action with the configPath option:

Error: Unexpected token � in JSON at position 0

.github/workflows/on-push.yaml:

      - name: run-lighthouse-ci
        uses: treosh/lighthouse-ci-action@v7
        with:
          configPath: './lighthouserc.json'

I've found that if I remove the configPath option I get a different error related to LHCI, which is probably due to me not passing url.

./lighthouserc.json

{
  "ci": {
    "collect": { "staticDistDir": "./dist/public/static" }
  }
}

Public repo that is affected (at the commit that is has the above example)
https://github.com/bradtaniguchi/bradtaniguchi.github.io/tree/dd4d980a2f9036b6e2e20333a4559cb4a64864f3

@bradtaniguchi
Copy link
Author

after bashing my head some, more the issue was with my lighthouserc.json which for some reason had 2 U+FFFD : REPLACEMENT CHARACTER characters at the start, probably due to me copy-pasting from a yaml formatter which screwed it up.

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