LoginSignup
0
1

More than 5 years have passed since last update.

Travis CI の PHP プロジェクトで NodeJS の最新版をインストールする

Posted at

Travis CI の language: php なプロジェクトで、node --version って叩いたら 0.10 だった。。。orz

いろいろググったら apt-get install する方法ばかり出て来たんですが、これだと sudo: required をセットしないといけない。

というわけで、調べたらちゃんと nvm が入ってて、sudo しなくてもよかった。

.travis.yml

language: php

php:
- '7.0'
- '5.6'

...

before_install:
  - nvm install node
  - nvm alias default node
  - node --version

これで最新版の NodeJS が使えるようになりました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1