Skip to content

Commit 20c312e

Browse files
committed
Pin nodejs version during Actions build.
This solves the problem of whatever node/npm ubuntu-latest happens to have in /usr/local/bin/{node,npm} producing `Error: Cannot find module 'semver'` errors when it is misconfigured in the image. (cf. https://askubuntu.com/questions/1152570/npm-cant-find-module-semver-error-in-ubuntu-19-04)
1 parent 40e7657 commit 20c312e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
with:
1515
fetch-depth: 1
1616

17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: '10.18.1'
20+
1721
- name: Build
1822
run: |
1923
cd build
@@ -46,6 +50,10 @@ jobs:
4650
with:
4751
fetch-depth: 1
4852

53+
- uses: actions/setup-node@v1
54+
with:
55+
node-version: '10.18.1'
56+
4957
# We have to build the dependencies in `lib` before running any tests.
5058
- name: Build
5159
run: |
@@ -86,4 +94,4 @@ jobs:
8694
if: matrix.os == 'windows-latest'
8795
run: |
8896
cd extensions/ql-vscode
89-
npm run integration
97+
npm run integration

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
- name: Checkout
3030
uses: actions/checkout@master
3131

32+
- uses: actions/setup-node@v1
33+
with:
34+
node-version: '10.18.1'
35+
3236
# The checkout action does not fetch the master branch.
3337
# Fetch the master branch so that we can base the version bump PR against master.
3438
- name: Fetch master branch

0 commit comments

Comments
 (0)