You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I am running the latest version of Node and the tools (Latest yo office but not latest node, v18.16.0)
I checked the documentation and found no answer
I checked to make sure that this issue has not already been filed
Expected behavior
The files generated after running yo office should work in VS Code without modification.
Current behavior
The run configurations fail as the "preLaunchTask" references a task with invalid syntax.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Run yo office --projectType taskpane --name "New Word AddIn" --host word --ts true
In VSCode open the run and debug menu, select "Word Desktop (Edge Chromium)" and click run.
Console output shows that the preLaunchTask failed due to a missing script.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Operating System: Windows 11
Node version: v18.16.0
Office version:
Tool version: 4.3.1
Failure Logs
Please include any relevant log snippets, screenshots or code samples here.
Executing task: npm run "start:desktop -- --app word"
npm ERR! Missing script: "start:desktop -- --app word"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
Suggestions
It seems if you create an npm task, as the plugin does, you cannot directly pass arguments as the piped output to npm will consider the full string as the script name "start:desktop -- --app word" and ofcourse that script doesn't exist. My fix is to rewrite the task to be of type shell instead of npm and pass the full npm command directly, below is the working version:
I have limited knowledge on how the tool works of course but if it's possible that the generator could instead generate tasks in this format, I believe this would be a non-issue. I also assume this affects all the tasks generated by the tool as they're in the same npm format.
The text was updated successfully, but these errors were encountered:
Prerequisites
Please answer the following questions before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
Expected behavior
The files generated after running yo office should work in VS Code without modification.
Current behavior
The run configurations fail as the "preLaunchTask" references a task with invalid syntax.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
yo office --projectType taskpane --name "New Word AddIn" --host word --ts true
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
Please include any relevant log snippets, screenshots or code samples here.
Suggestions
It seems if you create an npm task, as the plugin does, you cannot directly pass arguments as the piped output to npm will consider the full string as the script name "start:desktop -- --app word" and ofcourse that script doesn't exist. My fix is to rewrite the task to be of type
shell
instead ofnpm
and pass the full npm command directly, below is the working version:I have limited knowledge on how the tool works of course but if it's possible that the generator could instead generate tasks in this format, I believe this would be a non-issue. I also assume this affects all the tasks generated by the tool as they're in the same
npm
format.The text was updated successfully, but these errors were encountered: