From 1690307601c640b597805239c7d504b76cc13cb1 Mon Sep 17 00:00:00 2001 From: Ayush Meghwani Date: Fri, 24 Jul 2026 17:23:05 +0530 Subject: [PATCH] Fix Debug task to avoid fragile npm argument forwarding The 'Debug: Excel Desktop' task ran 'npm run start -- desktop --app excel', which relies on npm forwarding the '--app' option flag across the '--' separator. On some npm versions the flag is dropped, so the command resolves to 'office-addin-debugging start manifest.xml desktop excel' (3 positionals) and fails with 'too many arguments for start. Expected 2 arguments but got 3.' Because the task aborts, the dev server never starts and Excel then reports 'failed to download a required resource.' Move the arguments into a dedicated 'start:desktop' npm script so nothing is forwarded through '--'. This preserves the desktop/--app excel intent and works reliably across npm versions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .vscode/tasks.json | 6 +----- package.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 324fc8c..5fbe87c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -32,11 +32,7 @@ "command": "npm", "args": [ "run", - "start", - "--", - "desktop", - "--app", - "excel" + "start:desktop" ], "presentation": { "clear": true, diff --git a/package.json b/package.json index 63d0526..754934e 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "signin": "office-addin-dev-settings m365-account login", "signout": "office-addin-dev-settings m365-account logout", "start": "office-addin-debugging start manifest.xml", + "start:desktop": "office-addin-debugging start manifest.xml desktop --app excel", "stop": "office-addin-debugging stop manifest.xml", "test": "npm run test:unit && npm run test:e2e", "test:e2e": "mocha -r ts-node/register test/end-to-end/*.ts",