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
Generated vscode tasks.json file has invalid scripts that fail #786
Labels
Comments
Hi @DavidTheProgrammer, thanks for letting us know about this issue! @millerds can you please help with this issue? |
This was referenced Sep 17, 2023
This was referenced Nov 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: