How do I cache global NPM packages on Travis CI?

Locally installed packages are cached via:

# .travis.yml
...
cache:
  directories:
  - node_modules
...

But how do I cache globally installed packages ($ npm install -g <...>) to speed up my builds?


Source: ubuntu

Leave a Reply