LoginSignup
1
1

More than 1 year has passed since last update.

circleCIでyarnpkg組み込んだんだけど、気づいたらfailになってた

Last updated at Posted at 2017-01-16

最近、circleCIにyarnを組み込んだ。

どっかのブログからコピペして一時期使えてたけど、
yarnのバージョンアップによりエラーが出るようになってしまった。

すでにディレクトリあるんだけど!!!
みたいなエラーメッセージがでてたけど、コピペして残すの忘れた。

とりあえず、いい感じで下記を組み込んでもらえれば動くと思います。

circle.yml
machine:
  node:
    version: 7.2.0
  environment:
    YARN_VERSION: 0.18.1
    PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
dependencies:
  pre:
    - |
      if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
        curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
      fi
  cache_directories:
    - ~/.yarn
    - ~/.cache/yarn
  override:
    - yarn install

参考資料

Using Yarn (an NPM alternative) on CircleCI - CircleCI https://circleci.com/docs/2.0/yarn/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1