Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does travis install npm packages globally or locally by running the tests?

Tags:

npm

travis-ci

By default does travis install npm packages using package.json globally or locally? By some packages there can be differences, that's why I am asking.

like image 532
inf3rno Avatar asked Dec 25 '22 10:12

inf3rno


1 Answers

The npm install command will install them locally. (If you read the log expanding the git clone ... part, you'll see that it cd username/repo then it will launch the npm install command).

If you need some packages installed globally, add this to your .travis.yml file:

before_install:
- npm install -g your-package-name
like image 133
topheman Avatar answered Dec 27 '22 22:12

topheman