【问题标题】:circleci (v2.0) using npm when yarn is the run command当 yarn 是运行命令时使用 npm 的 circleci (v2.0)
【发布时间】:2017-08-25 18:38:00
【问题描述】:

有关于为 circleci v1 而不是 v2 设置纱线的文档,因为看起来好像他们已经将纱线烘焙到 v2 api 中,但是,在我的 config.yml 中,我明确运行纱线来安装我的 deps,当我查看构建日志,它显示 npm 用于我所有的纱线命令......我显然需要覆盖这个/安装纱线?不幸的是,v2 文档似乎没有涉及到这一点,而且我的 google-foo 也没有取得成果……

更有趣的是,我的另一个项目是使用具有几乎完全相同配置的纱线……什么给出了?

这是我当前的 config.yml

# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: yarn

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run: yarn test
      - run: echo "ALL GOOD IN THE HOOD"
      - deploy:
          name: Deploy on deploy branch
          command: |
            if [ "${CIRCLE_BRANCH}" == "deploy" ]; then
              ./node_modules/.bin/firebase ...
            fi

【问题讨论】:

    标签: reactjs circleci yarnpkg


    【解决方案1】:

    我发现了问题所在。我的 circleci 文件夹拼写错误。我省略了.,它使用的是默认配置...叹息...

    【讨论】:

      猜你喜欢
      • 2021-11-27
      • 1970-01-01
      • 2021-12-16
      • 1970-01-01
      • 2021-10-05
      • 2020-12-15
      • 2014-08-01
      • 2020-11-28
      • 1970-01-01
      相关资源
      最近更新 更多