-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
@@ -22,4 +25,4 @@ jobs: | |||
- windows-latest | |||
node: | |||
- lts/erbium | |||
- node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
node
alias: 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:
node
alias with17
, until actions/setup-node supports something like feat: add support forcurrent
andlatest
aliases actions/setup-node#279npm install -g npm@latest-7
to 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