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.
[x ] I am running the latest version of Node and the tools
[x ] I checked the documentation and found no answer
[x ] I checked to make sure that this issue has not already been filed
Expected behavior
No files are corrupted.
Current behavior
When a project is created taking the SSO and TypeScript options (and any host), the file \src\middle-tier\ssoauth-helper.ts is corrupt. Specifically, the first 15 lines and most of line 16 are deleted.
The following is line 16 as it appears in the repo. In the generated project, everything except the string e<any> { at the end is deleted and all lines above this one are deleted.
export async function getAccessToken(authorization: string): Promise<any> {
This breaks the project.
I can reproduce this on multiple machines and several versions of Node.js in the 18.x.x and 20.x.x ranges. It happens in both a Command Prompt and a git bash.
If I clone the template repo and manually test the convertToSingleHost.js file, the file is not corrupted, so I think it must happen when the file is fetched from the repo by the generator.
If I take the JavaScript option, the resulting project is fine. The corresponding JS file, ssoauth-helper.js, is not corrupted.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Install latest Yo Office.
Run it.
Select the SSO option.
Select TypeScript.
Give it any name you want.
Choose any host you want.
When the project is generated, the ssoauth-helper.ts file is corrupt as described above.
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
Node version: 18.16.1, 18.19.0, 20.9.0, and 20.11.0
Office version: N/A
Tool version: fresh install of the latest
Failure Logs
Please include any relevant log snippets, screenshots or code samples here.
The text was updated successfully, but these errors were encountered:
You'll find those missing lines at the end of the file (they should be moved to the top). This looks like a problem with newer versions of node (18.16+) the package we are using to unzip the templates files downloaded from the github repo they are stored in (see the posts linked to bellow). We are tracking work to fix this internally (item: 8084264) but can't promise the timeline to fix it.
This should be fixed now . . . published a new version of generator-office that uses a different unzipper (also I think there was a bug in node that was fixed that helped the previous unzipper library).
Prerequisites
Please answer the following questions before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
Expected behavior
No files are corrupted.
Current behavior
When a project is created taking the SSO and TypeScript options (and any host), the file \src\middle-tier\ssoauth-helper.ts is corrupt. Specifically, the first 15 lines and most of line 16 are deleted.
The following is line 16 as it appears in the repo. In the generated project, everything except the string
e<any> {
at the end is deleted and all lines above this one are deleted.export async function getAccessToken(authorization: string): Promise<any> {
This breaks the project.
I can reproduce this on multiple machines and several versions of Node.js in the 18.x.x and 20.x.x ranges. It happens in both a Command Prompt and a git bash.
If I clone the template repo and manually test the convertToSingleHost.js file, the file is not corrupted, so I think it must happen when the file is fetched from the repo by the generator.
If I take the JavaScript option, the resulting project is fine. The corresponding JS file, ssoauth-helper.js, is not corrupted.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
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.
The text was updated successfully, but these errors were encountered: