Skip to content

Commit e89907f

Browse files
committed
Test: Update npm to v4 when nodejs is v5 because of npm install error.
1 parent e970322 commit e89907f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ node_js:
1717
- '0.12'
1818
- '0.10'
1919

20+
before_install:
21+
- if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -eq 5 ]; then
22+
npm i -g npm@4;
23+
fi
24+
2025
after_success:
2126
- if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -ge 6 ]; then
2227
npm run coveralls;

appveyor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ environment:
2020

2121
install:
2222
- ps: Install-Product node $env:nodejs_version
23-
- npm install
23+
- ps: if ($env:nodejs_version -eq '5') { npm i -g npm@4 }
24+
- cmd: npm install
2425

2526
test_script:
2627
- node --version

0 commit comments

Comments
 (0)