Skip to content

Commit 213d2e1

Browse files
dy-dxsmart-alek
authored andcommitted
Fix paths in yarn docs (circleci#477)
When the dependency step is overridden to use "yarn install", CircleCI doesn't add `node_modules/.bin` to the path. Also, the yarn cache directory on CircleCI ends up being `~/.cache/yarn`, not `~/.yarn-cache`
1 parent aa0b2bf commit 213d2e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jekyll/_docs/install-and-use-yarn.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ description: "How to modify `circle.yml` in order to install and use Yarn on Cir
1515
```
1616
machine:
1717
environment:
18-
YARN_VERSION: 0.17.8
19-
PATH: "${PATH}:${HOME}/.yarn/bin"
18+
YARN_VERSION: 0.18.0
19+
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
2020
```
2121

2222
We've set the Yarn version here to reduce the number of moving parts in the build. Although the Yarn install script sets its `PATH`, running from cache requires adding `~/.yarn/bin/` explicitly.
@@ -32,7 +32,7 @@ dependencies:
3232
fi
3333
cache_directories:
3434
- ~/.yarn
35-
- ~/.yarn-cache
35+
- ~/.cache/yarn
3636
```
3737

3838
Here, the Yarn install script runs if and only if:
@@ -70,8 +70,8 @@ machine:
7070
```
7171
machine:
7272
environment:
73-
YARN_VERSION: 0.17.8
74-
PATH: "${PATH}:${HOME}/.yarn/bin"
73+
YARN_VERSION: 0.18.0
74+
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
7575
7676
dependencies:
7777
pre:
@@ -86,7 +86,7 @@ dependencies:
8686
- yarn install
8787
cache_directories:
8888
- ~/.yarn
89-
- ~/.yarn-cache
89+
- ~/.cache/yarn
9090
9191
test:
9292
override:

0 commit comments

Comments
 (0)