Fix Node in Actions on Windows - #280
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #280 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 73 73
Lines 8451 8451
=========================================
Hits 8451 8451 Continue to review full report at Codecov.
|
6106a51 to
941b2c4
Compare
| - windows-latest | ||
| node: | ||
| - lts/erbium | ||
| - node |
There was a problem hiding this comment.
Only the change of this line should be enough? You should be able to skip all others. See unifiedjs/unified@6f6a5c2
There was a problem hiding this comment.
Thanks! I think the dcodeIO/setup-node-nvm step failed to install Node.js in that commit's ☝️ lts/gallium on windows-latest check: https://github.com/unifiedjs/unified/runs/4991302576?check_suite_focus=true#step:3:1
Consequently the check passed, but version 16.13.2 was used?
- https://github.com/unifiedjs/unified/runs/4991302576?check_suite_focus=true#step:1:9
- https://github.com/actions/virtual-environments/blob/win19/20220123.1/images/win/Windows2019-Readme.md#language-and-runtime
I gave it a try today and confirmed version 16.14.0 is affected (same as 17.4.0):
- https://github.com/remarkjs/remark-lint/runs/5259399904?check_suite_focus=true#step:3:16
- https://github.com/remarkjs/remark-lint/runs/5259399904?check_suite_focus=true#step:4:4
Avoiding older nvm-windows, by replacing dcodeIO/setup-node-nvm with actions/setup-node, solves that problem.
wooorm
left a comment
There was a problem hiding this comment.
Thanks for your patience Jack!
Initial checklist
Description of changes
There's an apparent conflict between new versions of Node.js (? 17.5.0)/npm (? 8.4.1) and old versions of nvm-windows (? 1.1.7):
I didn't get to the absolute bottom of it because https://github.com/dcodeIO/setup-node-nvm hasn't been updated in a while and describes itself as merely a placeholder until https://github.com/actions/setup-node supports aliases, which it now seems to --- except for a
nodealias: actions/setup-node#279Additionally there's a problem installing npm globally on Windows when starting below version 7.5.4: npm/cli#4341 (comment)
So, what I did in this PR is:
nodealias with17, until actions/setup-node supports something like feat: add support forcurrentandlatestaliases actions/setup-node#279npm install -g npm@latest-7to get around [BUG][8.4.0][Windows] npm i -g npm@8 fails in GitHub Actions npm/cli#4341 (comment) and install npm with workspaces on lts/erbium