-
Notifications
You must be signed in to change notification settings - Fork 386
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
Path issue on windows using NVM to manage node, "ERROR: Cannot find npm binary" #851
Comments
I tried to build locally to make a fix for a PR but I couldn't get config-ui-x to build on windows with the instructions in CONTRIBUTING.MD There are two ways to fix this that I see, one is
plugins.service.ts
OR add NVM_SYMLINK to the windows paths searched plugins.service.ts
|
I worked around the issue for now with a symlink, from an administrator cmd prompt |
Thanks, fixed with the |
Describe The Bug:
When using nvm on windows logs show "ERROR: Cannot find npm binary"
I think this is due to this function here https://github.com/oznu/homebridge-config-ui-x/blob/45a49188e2cadf52857314bb8620d594e1bb6cc7/src/modules/plugins/plugins.service.ts#L639
It checks a couple set paths on windows but does not check the $PATH environment variable. When using NVM the node/npm installation is on the path but not at any of the fixed locations checked by that function. I think this could be quickly resolved by also just checking if npm is on the path when using windows.
To Reproduce:
Install node via nvm windows, install homebridge-config-ui-x and service. Run it and see this error in the logs.
Expected behavior:
homebridge-config-ui-x should always check the path for binaries, even on windows.
Logs:
Homebridge Config:
N/A
Screenshots:
N/A
Environment:
The text was updated successfully, but these errors were encountered: