-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Update Windows install script workaround npm issue #1654
Conversation
@longzheng just to confirm, this still installs/runs the service itself as user account right? |
@koush Correct, this should keep the service as user account. However I'm a bit confused why
I'm going to do a bit more testing with a local VM and report back |
OK I confirmed on a brand new Windows 11 VM, the current script (without the fix) definitely errors when running the However, the server continues to work More questions
|
That is so weird, removing the |
Maybe the easier fix is to simply create the missing directory? |
Yeah good idea. The fact that I can't repro it is kind of weird, I wonder how else is the test runner different. |
Although if the server still runs even with that command failing, is the command necessary? How can the service/server run without the install? |
The npx command that runs it will also install it if it's missing. Used to handle updates too. |
Do you think then maybe it's simpler to not run the |
the reason the install is done is because if would cause a long first run after install. and installation failures would be opaque. |
OK that's fair enough. I'm super curious then why the test server would fail with this, I need to get the logs. I might try modify the workflow to dump the output of the daemon logs. |
@koush sorry to be a bother could you kill this run since it'll go on forever https://github.com/koush/scrypted/actions/runs/12193672987/job/34016265645 |
I logged EDIT: I also confirmed with a second EDIT 2: Confirmed the Windows image has Node 18 built-in https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md |
OK I finally figured out what's happening. Before the change:
After the
New change:
|
I was just testing the Windows install script recently and noticed that it would actually fail on the
npx
commandsAfter some digging it's due to Node.js removing creating the
%APPDATA%\npm
folder in the MSI installer nodejs/node@0ae8bf8 which then causes thenpx
command to fail nodejs/node#53538This was fixed in
npm
npm/cli#7640 but it's not included with the npm installed in Node 20.11.1 specified in the install scriptThis
npm i -g npm
is a workaround nodejs/node#53538 (comment)Also added
#Requires -RunAsAdministrator
so the script will error if it's not run under admin