setup-node
setup-node copied to clipboard
Occasionally error: 1823 Segmentation fault (core dumped) npm install
Description:
Occasionally when running npm install:
Run npm install
/home/runner/work/_temp/9d355b[4](https://github.com/eslint/eslint/actions/runs/8598532822/job/23559533208?pr=18289#step:4:5)d-c108-413d-9445-84fc1608c1c2.sh: line 1: 1823 Segmentation fault (core dumped) npm install
Error: Process completed with exit code 139.
Action version: actions/setup-node@v4 Specify the action version
Platform:
- [x ] Ubuntu
- [ ] macOS
- [ ] Windows
Runner type:
- [ x] Hosted
- [ ] Self-hosted
Tools version: lts/* + npm
Repro steps:
https://github.com/eslint/eslint/actions/runs/8598532822/job/23559533208?pr=18289
Expected behavior: install successfully.
Actual behavior: as above.
another repro: https://github.com/eslint-community/eslint-plugin-n/actions/runs/8598111786/job/23558240907
Hello @aladdin-add, Thank you for creating the issue and we will look into it :)
Hi @aladdin-add , We've successfully executed the workflow without encountering any errors. Here's the screenshot for your reference. If you encounter the same error in future, below are some troubleshooting steps which might resolve this issue:
- Delete the node_modules directory and package-lock.json file, then run npm install again
- name: Install dependencies
run: |
rm -rf node_modules package-lock.json
npm install
- Check whether there are any incompatible versions of packages in your package.json file.
- Ensure that Node.js is up-to-date
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: '20' # or any latest stable version
Yes, it's not 100% reproduceable: it disappeared when I re-run it. Just filed it in case someone else encountered.
some more info:
- eslint was not using lockfile: https://github.com/eslint/eslint?tab=readme-ov-file#why-doesnt-eslint-lock-dependency-versions
- the failed job was already using node lts(20.x)
Please feel free to close if you think there is no concrete action here. :)
Hi @aladdin-add, I'm going to close the issue for now because the error was not reproducible. If you have further questions or if you manage to reproduce the issue, please feel free to reopen it or create a new one. Thank you!