From 27196b3b05cf4b6cf59f7c3691adbcd084ffcb61 Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Mon, 2 Feb 2026 08:28:31 -0600 Subject: [PATCH] Use escaped double quotes in npm scripts for Windows compatibility Single quotes in `concurrently` commands work on Unix shells but not on Windows Command Shell (`cmd.exe`), causing the `INPUT` environment variable to not be set and npm scripts to fail with errors like: 'cross-env' is not recognized as an internal or external command Error: INPUT environment variable is not set Replace single quotes with escaped double quotes (`\"`) in npm scripts in all example `package.json` files. Co-Authored-By: Claude Opus 4.5 --- docs/quickstart.md | 5 ++++- examples/basic-server-preact/package.json | 2 +- examples/basic-server-react/package.json | 2 +- examples/basic-server-solid/package.json | 2 +- examples/basic-server-svelte/package.json | 2 +- examples/basic-server-vanillajs/package.json | 2 +- examples/basic-server-vue/package.json | 2 +- examples/budget-allocator-server/package.json | 2 +- examples/cohort-heatmap-server/package.json | 2 +- examples/customer-segmentation-server/package.json | 2 +- examples/debug-server/package.json | 2 +- examples/integration-server/package.json | 2 +- examples/map-server/package.json | 2 +- examples/pdf-server/package.json | 2 +- examples/quickstart/package.json | 2 +- examples/scenario-modeler-server/package.json | 2 +- examples/shadertoy-server/package.json | 2 +- examples/sheet-music-server/package.json | 2 +- examples/system-monitor-server/package.json | 2 +- examples/threejs-server/package.json | 2 +- examples/transcript-server/package.json | 2 +- examples/video-resource-server/package.json | 2 +- examples/wiki-explorer-server/package.json | 2 +- 23 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index 99ee795c..3fb11984 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -44,9 +44,12 @@ Configure your [`package.json`](https://github.com/modelcontextprotocol/ext-apps ```bash npm pkg set type=module npm pkg set scripts.build="tsc --noEmit && tsc -p tsconfig.server.json && cross-env INPUT=mcp-app.html vite build" -npm pkg set scripts.start="concurrently 'cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch' 'tsx watch main.ts'" +npm pkg set scripts.start='concurrently "cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch" "tsx watch main.ts"' ``` +> [!NOTE] +> Windows `cmd.exe` users will need to convert quotes in the above command: `npm pkg set scripts.start="concurrently ""cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch"" ""tsx watch main.ts"""`. +
Create tsconfig.json: diff --git a/examples/basic-server-preact/package.json b/examples/basic-server-preact/package.json index 1c13af30..7cfef2c9 100644 --- a/examples/basic-server-preact/package.json +++ b/examples/basic-server-preact/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/basic-server-react/package.json b/examples/basic-server-react/package.json index bf4dcea0..dbcb1a75 100644 --- a/examples/basic-server-react/package.json +++ b/examples/basic-server-react/package.json @@ -28,7 +28,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/basic-server-solid/package.json b/examples/basic-server-solid/package.json index 239376bf..52049f3e 100644 --- a/examples/basic-server-solid/package.json +++ b/examples/basic-server-solid/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/basic-server-svelte/package.json b/examples/basic-server-svelte/package.json index 97684b11..5ade2d25 100644 --- a/examples/basic-server-svelte/package.json +++ b/examples/basic-server-svelte/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/basic-server-vanillajs/package.json b/examples/basic-server-vanillajs/package.json index 0a48de26..8e1d8cac 100644 --- a/examples/basic-server-vanillajs/package.json +++ b/examples/basic-server-vanillajs/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/basic-server-vue/package.json b/examples/basic-server-vue/package.json index 7fc7f89c..1a329596 100644 --- a/examples/basic-server-vue/package.json +++ b/examples/basic-server-vue/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/budget-allocator-server/package.json b/examples/budget-allocator-server/package.json index 1a6d9c6e..4dcbf3f0 100644 --- a/examples/budget-allocator-server/package.json +++ b/examples/budget-allocator-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/cohort-heatmap-server/package.json b/examples/cohort-heatmap-server/package.json index 3fee9e0d..83d883c1 100644 --- a/examples/cohort-heatmap-server/package.json +++ b/examples/cohort-heatmap-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/customer-segmentation-server/package.json b/examples/customer-segmentation-server/package.json index ddb0918e..61c3b91a 100644 --- a/examples/customer-segmentation-server/package.json +++ b/examples/customer-segmentation-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/debug-server/package.json b/examples/debug-server/package.json index 8fbc81c9..86cb9ce1 100644 --- a/examples/debug-server/package.json +++ b/examples/debug-server/package.json @@ -19,7 +19,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/integration-server/package.json b/examples/integration-server/package.json index f00d4f85..fc254495 100644 --- a/examples/integration-server/package.json +++ b/examples/integration-server/package.json @@ -11,7 +11,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "serve": "bun --watch main.ts" }, "dependencies": { diff --git a/examples/map-server/package.json b/examples/map-server/package.json index ff6bc796..a89fba5e 100644 --- a/examples/map-server/package.json +++ b/examples/map-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/pdf-server/package.json b/examples/pdf-server/package.json index 4c2e78a1..64553a3f 100644 --- a/examples/pdf-server/package.json +++ b/examples/pdf-server/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/quickstart/package.json b/examples/quickstart/package.json index 3bf40fbd..aa0adc62 100644 --- a/examples/quickstart/package.json +++ b/examples/quickstart/package.json @@ -12,7 +12,7 @@ "license": "MIT", "scripts": { "build": "tsc --noEmit && tsc -p tsconfig.server.json && cross-env INPUT=mcp-app.html vite build", - "start": "concurrently 'cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch' 'tsx watch main.ts'" + "start": "concurrently \"cross-env NODE_ENV=development INPUT=mcp-app.html vite build --watch\" \"tsx watch main.ts\"" }, "dependencies": { "@modelcontextprotocol/ext-apps": "^1.0.0", diff --git a/examples/scenario-modeler-server/package.json b/examples/scenario-modeler-server/package.json index 9f546b0b..25ae2615 100644 --- a/examples/scenario-modeler-server/package.json +++ b/examples/scenario-modeler-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/shadertoy-server/package.json b/examples/shadertoy-server/package.json index fef12ec4..ca0ddcd5 100644 --- a/examples/shadertoy-server/package.json +++ b/examples/shadertoy-server/package.json @@ -20,7 +20,7 @@ "serve:stdio": "bun main.ts --stdio", "start": "cross-env NODE_ENV=development npm run build && npm run serve", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/sheet-music-server/package.json b/examples/sheet-music-server/package.json index 9c5dec58..717fccb4 100644 --- a/examples/sheet-music-server/package.json +++ b/examples/sheet-music-server/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/system-monitor-server/package.json b/examples/system-monitor-server/package.json index cc60923f..783da604 100644 --- a/examples/system-monitor-server/package.json +++ b/examples/system-monitor-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/threejs-server/package.json b/examples/threejs-server/package.json index 653370a6..f26909a9 100644 --- a/examples/threejs-server/package.json +++ b/examples/threejs-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" }, diff --git a/examples/transcript-server/package.json b/examples/transcript-server/package.json index 897ec32c..f896bc7b 100644 --- a/examples/transcript-server/package.json +++ b/examples/transcript-server/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/video-resource-server/package.json b/examples/video-resource-server/package.json index 0d5a7aa1..75016384 100644 --- a/examples/video-resource-server/package.json +++ b/examples/video-resource-server/package.json @@ -18,7 +18,7 @@ "watch": "cross-env INPUT=mcp-app.html vite build --watch", "serve": "bun --watch main.ts", "start": "cross-env NODE_ENV=development npm run build && npm run serve", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\"", "prepublishOnly": "npm run build" }, "dependencies": { diff --git a/examples/wiki-explorer-server/package.json b/examples/wiki-explorer-server/package.json index 372c7291..e3a0aee2 100644 --- a/examples/wiki-explorer-server/package.json +++ b/examples/wiki-explorer-server/package.json @@ -21,7 +21,7 @@ "start": "npm run start:http", "start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http", "start:stdio": "cross-env NODE_ENV=development npm run build && npm run serve:stdio", - "dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve:http'", + "dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve:http\"", "prepublishOnly": "npm run build", "serve": "bun --watch main.ts" },