travis-build icon indicating copy to clipboard operation
travis-build copied to clipboard

Add option `node_modules` for node.js builds

Open BanzaiMan opened this issue 7 years ago • 7 comments

To turn off manipulating $PATH

See https://github.com/travis-ci/travis-ci/issues/8813, https://github.com/travis-ci/travis-ci/issues/5092.

BanzaiMan avatar Nov 28 '17 19:11 BanzaiMan

The option node_modules is probably too vague. Maybe node_modules_bin_in_path, though this may be too long.

BanzaiMan avatar Nov 28 '17 19:11 BanzaiMan

Anything we can help with to get this forward?

ankon avatar Aug 03 '18 10:08 ankon

Thanks for the ping. I'll have a look into this next week.

joshk avatar Aug 03 '18 19:08 joshk

I'm sorry, I'll need a little longer to look into this as I wanted to talk to our friends at NPM for some advice.

joshk avatar Aug 05 '18 06:08 joshk

@joshk any updates in this regard?

crequena-babbel avatar Jan 07 '19 15:01 crequena-babbel

My workaround to this has been to prepend PATH to the rvm command:

  • PATH="/bin:$PATH" rvm use $(< .ruby-version) --install --binary --fuzzy

crequena-babbel avatar Jan 08 '19 10:01 crequena-babbel

Any update on this?

It took me a while to find the source of the problem of why commands (e.g. which or npm etc.) were working in my project root, but any other directory they were failing.

My workaround is to remove the entry from PATH with a cross-platform compatible line like this:

PATH=$(echo "$PATH" | sed 's/.\/node_modules\/.bin://')

MaximDevoir avatar Nov 12 '19 00:11 MaximDevoir