Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Error when run yarn deploy-storybook --ci in CircleCi #63

Open
rafaelmusetti opened this issue May 30, 2019 · 5 comments
Open

Error when run yarn deploy-storybook --ci in CircleCi #63

rafaelmusetti opened this issue May 30, 2019 · 5 comments

Comments

@rafaelmusetti
Copy link

Hey guys,

I'm having an error while trying to deploy with CircleCi.

I don't know what's happening, because the problem began to appear now, and before that, it was already working.

my config:

version: 2 # use CircleCI 2.0
jobs:
  build:
    docker:
      - image: circleci/node:9-stretch
    environment:
      TZ: "/usr/share/zoneinfo/America/Sao_Paulo"
    steps:
      - checkout # special step to check out source code to working directory
      - run: sudo apt-get update
      - run: sudo apt-get install apt-transport-https
      - run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
      - run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
      - run: sudo apt-get update && sudo apt-get install yarn && yarn
      - save_cache: # special step to save the dependency cache
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - ./node_modules
      - run:
          name: Run React Tests
          command: yarn jest --no-cache --runInBand

  deploy:
    docker:
      - image: circleci/node:12.2.0
    environment:
     GH_TOKEN: "MY_GH_TOKEN"
     NPM_TOKEN: "MY_NPM_TOKEN"
    steps:
      - checkout
      - run: sudo apt-get update
      - run: sudo apt-get install apt-transport-https
      - run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
      - run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
      - run: sudo apt-get update && sudo apt-get install yarn && yarn
      - run:
          name: Deploy Storybook
          command: yarn deploy-storybook --ci

  release:
    docker:
      - image: circleci/node:9-stretch
    environment:
     GH_TOKEN: "MY_GH_TOKEN"
     NPM_TOKEN: "MY_NPM_TOKEN"
    steps:
      - checkout
      - run: sudo apt-get update
      - run: sudo apt-get install apt-transport-https
      - run: curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
      - run: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
      - run: sudo apt-get update && sudo apt-get install yarn && yarn
      # Run optional required steps before releasing
      # - run: npm run build-script
      - run: yarn semantic-release

workflows:
  version: 2
  test_and_release:
    jobs:
      - build
      - deploy:
          requires:
              - build
      - release:
          requires:
            - build

This is the error:
circleCi

Can someone help me?

@rizky
Copy link

rizky commented Sep 23, 2019

try to run npm run build-storybook. I think it will give you better error message

@tysonnero
Copy link

@rafaelmusetti Did you figure this out? I'm getting the same error running this in Github Actions

@tysonnero
Copy link

In my case, when I run npm run build-storybook in CI, it works just fine.

@rturk
Copy link

rturk commented Feb 14, 2020

Have similar issue, this repo only works with npm ?

@boatcoder
Copy link

If it builds your storybook before deploying, it uses npm, even if you used yarn to run the deploy-storybook command. Since I'm using nvm this causes other issues :-(

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

No branches or pull requests

5 participants