I am trying to configure my gitlab-ci to use yarn install instead of npm install
My current gitlab-ci.yml looks like this:
image: node:6.9.4 cache: paths: - node_modules/ - .yarn before_script: - apt-get update -qq && apt-get install -qy libelf1 stages: - test test_core: stage: test script: - yarn config set cache-folder .yarn - yarn install - npm run build - npm run test tags: - 2gb
But the build failed with the error: /bin/bash: line 48: yarn: command not found
Is there something I am missing? I tried to set the yarn with:
curl -o- -L https://yarnpkg.com/install.sh | bash
this gave me the same error, perhaps because I need to reload the bash environment so that the thread command becomes available.
The above configuration works with npm install .
Please help me solve this problem. If something is missing in my configuration file, or something is wrong with gitlab-ci. Thanks.
source share