Skip to content

Commit

Permalink
fix(CI): replace yarn1 with npm when generating PDF docs
Browse files Browse the repository at this point in the history
yarn1 appears to struggle with a dependency "string-width".
To prevent CI from breaking, this PR replaces the use of yarn with npm
when generating documentation PDF.
Issue reported in multiple places such as:
yarnpkg/yarn#8994
storybookjs/storybook#22431
  • Loading branch information
oscarmuhr committed Jan 2, 2024
1 parent 8eaeb53 commit 34aed9d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .sage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ func GenerateApiDoc(ctx context.Context) error {
}

func installRapiPdfCli(ctx context.Context) error {
if err := sg.Command(ctx, "yarn", "global", "add", "node-gyp").Run(); err != nil {
return err
}
cmd := sg.Command(ctx, "yarn", "global", "add", "@kingjan1999/rapipdf-cli")
// Using npm rather than yarn as yarn1 struggles with the dependency "string-width"
// and breaks the CI. https://github.com/einride/extend/pull/221
cmd := sg.Command(ctx, "npm", "--global", "install", "@kingjan1999/rapipdf-cli")
return cmd.Run()
}

Expand Down

0 comments on commit 34aed9d

Please sign in to comment.