chromaui/chromatic-cli

build-storybook fails in Github Actions

Closed this issue ยท 3 comments

here is my yml

# .github/workflows/chromatic.yml

# Workflow name
name: 'Chromatic'

# Event for the workflow
on: push

# List of jobs
jobs:
  chromatic-deployment:
    # Operating System
    runs-on: ubuntu-latest
    # Job steps
    steps:
      - uses: actions/checkout@v1
      - name: Install dependencies
        run: yarn
        # ๐Ÿ‘‡ Adds Chromatic as a step in the workflow
      - name: Publish to Chromatic
        uses: chromaui/action@v1
        # Chromatic GitHub Action options
        with:
          # ๐Ÿ‘‡ Chromatic projectToken, refer to the manage page to obtain it.
          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

here is set up job

# set up job
Current runner version: '2.291.1'
Operating System
  Ubuntu
  [2](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:2)0.04.4
  LTS
Virtual Environment
  Environment: ubuntu-20.04
  Version: 20220515.1
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220515.1/images/linux/Ubuntu2004-Readme.md
  Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220515.1
Virtual Environment Provisioner
  1.0.0.0-main-20220516-1
GITHUB_TOKEN Permissions
  Actions: write
  Checks: write
  Contents: write
  Deployments: write
  Discussions: write
  Issues: write
  Metadata: read
  Packages: write
  Pages: write
  PullRequests: write
  RepositoryProjects: write
  SecurityEvents: write
  Statuses: write
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v1' (SHA:50fbc622fc4ef516[3](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:3)becd7fab6573eac35f8[4](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:4)62e)
Download action repository 'chromaui/action@v1' (SHA:33[5](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:5)22e2f4a43a[6](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:7)b6c39c2[7](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:8)4efc[9](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:10)6[10](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:1:11)c4d55d0390)

here is error log

# install dependencies
Run yarn
  yarn
  shell: /usr/bin/bash -e {0}
yarn install v1.[2](https://github.com/subscan-explorer/ui/runs/6663057598?check_suite_focus=true#step:3:2)2.18
error An unexpected error occurred: "/home/runner/work/ui/ui/package.json: Unexpected token c in JSON at position 679".
info If you think this is a bug, please open a bug report with the information provided in "/home/runner/work/ui/ui/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

Hi @ZhangCheng-zh -- is ui/ui/ an expected directory here? It seems maybe similar to #579 (comment)

Are you using the vite builder?

Ok, as I mentioned in this comment I think the duplicate folder name is some artifact of GitHub actions.

Your issue here seems to just be your package.json is broken--what does it look like?