Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/inspector-windows-spawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@nuxtjs/mcp-toolkit": patch
---

Fix "spawn npx ENOENT" error when launching the MCP Inspector on Windows.

Since the Node.js CVE-2024-27980 mitigation (Node 18.20.2 / 20.12.2), `child_process.spawn` no longer resolves `.cmd`/`.bat` shims on Windows without `shell: true`. This caused the DevTools "Launch Inspector" button to throw `ENOENT` on every Windows machine.

`shell: true` is now passed only when `process.platform === 'win32'`, leaving the default behaviour unchanged on Linux and macOS.

Closes #259.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ async function launchMcpInspector(nuxt: Nuxt, options: ModuleOptions): Promise<v
], {
stdio: ['ignore', 'pipe', 'pipe'],
env,
shell: globalThis.process.platform === 'win32',
})

const childProcess = inspectorProcess
Expand Down
Loading