-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: resolve critical failures on macOS - spawn npx ENOENT and missing webview assets #6663
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -590,9 +590,12 @@ export class McpHub { | |||||||||||||||||||||||
| const isAlreadyWrapped = | ||||||||||||||||||||||||
| configInjected.command.toLowerCase() === "cmd.exe" || configInjected.command.toLowerCase() === "cmd" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const command = isWindows && !isAlreadyWrapped ? "cmd.exe" : configInjected.command | ||||||||||||||||||||||||
| // Check if the command is npx or other npm-related commands that might be scripts | ||||||||||||||||||||||||
| const isNpmCommand = ["npx", "npm", "pnpm", "yarn"].includes(configInjected.command.toLowerCase()) | ||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fix is for Windows but the issue (#6662) is on macOS. The ENOENT error happens because npx isn't found in PATH on macOS, not because it needs cmd.exe wrapping. Could we instead:
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we're already modifying this area, should we add better error handling for the macOS case? Something like:
Suggested change
|
||||||||||||||||||||||||
| const command = isWindows && !isAlreadyWrapped && isNpmCommand ? "cmd.exe" : configInjected.command | ||||||||||||||||||||||||
| const args = | ||||||||||||||||||||||||
| isWindows && !isAlreadyWrapped | ||||||||||||||||||||||||
| isWindows && !isAlreadyWrapped && isNpmCommand | ||||||||||||||||||||||||
| ? ["/c", configInjected.command, ...(configInjected.args || [])] | ||||||||||||||||||||||||
| : configInjected.args | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern
chunk-*.jsshould catch the missing file, but the error showschunk-pO14Kfwb.jswasn't found. Is it possible the build process generates these files with a different pattern or in a different location? We should verify that all webpack chunk files are actually matching this pattern.