Skip to content
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

Merged
merged 2 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix CI: npm ERR! Unexpected token '.'
  • Loading branch information
jablko committed Feb 18, 2022
commit 3c410d390fea1840ec1ecacf3880f89cf09c9b8b
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: dcodeIO/setup-node-nvm@master
- name: Use Node.js ${{matrix.node}}
uses: actions/setup-node@v2
wooorm marked this conversation as resolved.
Show resolved Hide resolved
with:
node-version: ${{matrix.node}}
#cache: npm
- run: npm install -g npm@7 # https://github.com/npm/cli/issues/4341#issuecomment-1040608101
wooorm marked this conversation as resolved.
Show resolved Hide resolved
- run: npm install -g npm
- run: npm install
- run: npm test
Expand All @@ -22,4 +25,4 @@ jobs:
- windows-latest
node:
- lts/erbium
- node
Copy link
Member

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

Copy link
Contributor Author

@jablko jablko Feb 19, 2022

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?

I gave it a try today and confirmed version 16.14.0 is affected (same as 17.4.0):

Avoiding older nvm-windows, by replacing dcodeIO/setup-node-nvm with actions/setup-node, solves that problem.

- lts/*