-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Failed to install usb-detection in windows-latest environment #280
Comments
Hello @kiruh. I've tested your package.json and it looks like everything works as expected. Could you please confirm if it works for you ? |
Yes, it works for now. There were no failing builds for some time. I hope this behavior persists since that problem wouldn't occur each time before 🤷 One time run would be successful, the other it would fail. I suppose issue can be closed for now and if it continues to fail I'll reopen it. |
Failed to build @serialport/bindings on Although the problem now is different:
Learn more
💡 The good thing is that it works when I switch it back to |
Hi, @kiruh 👋 ! I've tested your case with Cheers! |
Hi @IvanZosimov, The problem is still there. package.json {
"name": "my-app-name",
"version": "0.1.0",
"scripts": {
"postinstall": "electron-builder install-app-deps"
},
"dependencies": {
"serialport": "^9.0.7",
"usb-detection": "^4.13.0"
},
"devDependencies": {
"electron": "^12.0.9",
"electron-builder": "^22.9.1"
}
} workflow.yml name: Workflow
on: workflow_dispatch
defaults:
run:
working-directory: electron
jobs:
release_on_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 14
- name: Install dependencies
run: npm install Log
|
Hi, @kiruh 👋 ! The root cause of your problem is in the version of the node-gyp. The thing is that the version which is bundled in npm is too outdated (in your case it's v5.1.0). Such an old version simply doesn't support VS2022, which is the only version of the VS installed on the
Could you, please, ping me if everything is OK? |
Hi @IvanZosimov, Yes, it works! Thank you 🎉 Final Resultworkflow.yml name: Workflow
on: workflow_dispatch
jobs:
release_on_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 14
- name: Update node-gyp
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
cd $NodeModulesPath
npm install node-gyp@8.x
- name: Install dependencies
run: npm install |
I have a related issue. My matrix is Node 14, 16, 18 with I have an , it seems to work on Node 16 and 18 but on Node 14 I was getting the same error as in the issue and it was using node-gyp 5 verhovsky/node-tree-sitter@98276a6 https://github.com/verhovsky/node-tree-sitter/actions/runs/4377505882/jobs/7661070137
after adding the lines suggested in the issue it works, however on Node 16 and 18 I got this error https://github.com/verhovsky/node-tree-sitter/actions/runs/4377590661/jobs/7661258077
so I changed my if: ${{ matrix.os == 'windows-latest' && matrix.node == '14' }} and now windows+node 14 passes but windows+node 16 and windows+node 18 show this error (they run node-gyp 9):
I tried doing https://github.com/verhovsky/node-tree-sitter/actions/runs/4378111273/jobs/7662433833
|
* feat: add pathspec_error_handling input * fix: show add/rm errors on same line * docs(README): add docs for new input
When I run
npm install
in GitHub Actionswindows-latest
environment I get following errorInteresting is that each time I run the workflow I get different errors or no errors at all and install succeeds
What's common is that if install fails it does on
node-gyp rebuild
commandnode-gyp rebuild
is called by usb-detection and @serialport/bindings packages in their install scriptsIt looks like
node-gyp
fails to find some files, e.g.node.h
,v8.h
,common.gypi
It is really hard to debug it since the outcome alters with each run
Any suggestions on what may be a reason of it?
Workflow
Dependencies
Error examples
Log example
The text was updated successfully, but these errors were encountered: