Skip to content

Conversation

@vlascik
Copy link
Contributor

@vlascik vlascik commented Oct 17, 2025

Summary

On Windows when adding npx extensions, Goose tries to find node.exe at default paths in Program Files, and then fails for everyone that installed node elsewhere. This PR tries to also find the path from the registry, which should mitigate the problem for people that already have node installed, but in a different folder.

Also the error messages are made a bit clearer about what the problem is, so that users can try to rectify it on their own.

The node.js install script doesn't seem to quite work, but that's left for another PR.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Build on Windows

Related Issues

Relates to #4030

Signed-off-by: V. Lascik <vlascik@users.noreply.github.com>
Signed-off-by: V. Lascik <vlascik@users.noreply.github.com>

// If this is a Stdio extension that uses npx, check for Node.js installation
#[cfg(target_os = "windows")]
use winreg::enums::{HKEY_LOCAL_MACHINE, KEY_READ};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great. does this mean we can delete the code in the API handler that tries to do the same thing? but only in the API so that would not work for the CLI I think?

Copy link
Contributor Author

@vlascik vlascik Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what code do you mean? All I can see are some shell scripts trying to install node.js again in a default directory, which is probably not going to work for people that already have node installed elsewhere anyway (the chances are their install will just be updated).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean now, there is a new PR that moved this code to crates/goose-server/src/routes/agent.rs now, is this what you meant?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sorry I moved this - do you want to do that or should I just copy your code over if that is faster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DOsinga just copy it, it will be faster.

@zanesq zanesq requested a review from DOsinga October 28, 2025 22:05
@DOsinga DOsinga requested review from jamadeo and removed request for jamadeo November 6, 2025 21:40
@DOsinga
Copy link
Collaborator

DOsinga commented Nov 8, 2025

/cc @jamadeo can we add this to your path magic or should it say separate

@vlascik vlascik mentioned this pull request Nov 13, 2025
10 tasks
@vlascik
Copy link
Contributor Author

vlascik commented Nov 13, 2025

Files moved around, so I did a new rebase of this PR at #5731 to make review/merge easier.

@vlascik vlascik closed this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants