Override only

I’ve followed the yarn override instructions but found that when overriding I can’t just override the npm install command, and have to override all inferred commands.

This prevents a few other inferred dependencies from running. For example, a normal inferred build looks as follows

Exporting NODE_ENV  00:02inference
Exporting PATH      00:02inference
$ npm install       03:49inference
composer install

And a build with

    - yarn

The inferred dependencies look as follows

$ yarn

Obviously I’m now missing some commands. I could add them, but I can’t find documentation on what they’re doing, and also this means that any other automatically inferred commands won’t be added.

Is there a way I can prevent npm running automatically but leave the other inferred dependencies running?

In the mean time, what exact commands would the following titled processes be running?

// Presumably export NODE_ENV=ci
Exporting NODE_ENV  00:02inference
// Unknown
Exporting PATH      00:02inference


1 Like

I have just replaced the npm binary with yarn for now rather than using overrides. The inferred commands run npm which actually runs yarn.

    - NPM_BINARY=$(which npm); mv $NPM_BINARY .; ln -s $(which yarn) $NPM_BINARY

I have the same issue on rails (I need it to run bundle and yarn).

I’ve confirmed that your workaround works for me .

An official solution would be much appreciated!

Worked here too. Still, not the best solution I think. An oficial config would be awesome.

I managed to get it to work by adding the following:

    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
    NODE_ENV: 'test'
    RAILS_ENV: 'test'
    RACK_ENV: 'test'
    - bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
    - yarn
    - ~/.cache/yarn