Skip to content

fix: regenerate docs/package-lock.json to resolve storybook binary not found#3009

Merged
llastflowers merged 2 commits intocopilot/fix-github-actions-workflow-another-onefrom
copilot/fix-github-actions-workflow-failure
Mar 12, 2026
Merged

fix: regenerate docs/package-lock.json to resolve storybook binary not found#3009
llastflowers merged 2 commits intocopilot/fix-github-actions-workflow-another-onefrom
copilot/fix-github-actions-workflow-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

The "Deploy preview / Build" CI job was failing with sh: 1: storybook: not found (exit code 127). The storybook binary was never symlinked into docs/node_modules/.bin/ after npm install.

What are you trying to accomplish?

Fix the failing CI job caused by the storybook CLI binary not being available after npm install in the docs/ directory.

What approach did you choose and why?

The committed docs/package-lock.json locked esbuild as a nested install under node_modules/storybook/node_modules/esbuild (v0.27.3). This inconsistent resolution — caused by the mixed Storybook 8/10 peer dependency graph in docs/package.json — prevented npm from correctly symlinking the storybook binary.

Regenerating the lock file (deleting it and re-running npm install) resolves esbuild@0.27.4 at the top level, which allows npm to correctly link node_modules/.bin/storybook.

Key difference in the new lock file:

  • Before: node_modules/storybook/node_modules/esbuild@0.27.3 (nested, binary not linked)
  • After: node_modules/esbuild@0.27.4 (top-level, binary correctly linked)

What should reviewers focus on?

The only change is docs/package-lock.json. The large diff is expected for a lock file regeneration — package versions are broadly the same, just resolved differently. The Storybook 8/10 version mix in docs/package.json (which is the root cause of the fragile resolution) remains unchanged; fixing that is a separate concern.

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • storybook.js.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/css/css/docs/node_modules/.bin/storybook build -o public/storybook ms.mjs (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow Deploy preview / Build
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 66861717721
Job URL: https://github.com/primer/css/actions/runs/23022339886/job/66861717721


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 12, 2026

⚠️ No Changeset found

Latest commit: 8542119

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>
Copilot AI changed the title [WIP] [66861717721] Fix failing GitHub Actions workflow Deploy preview / Build fix: regenerate docs/package-lock.json to resolve storybook binary not found Mar 12, 2026
Copilot AI requested a review from llastflowers March 12, 2026 20:45
@github-actions github-actions Bot temporarily deployed to Storybook Preview March 12, 2026 20:52 Inactive
@llastflowers llastflowers marked this pull request as ready for review March 12, 2026 21:12
@llastflowers llastflowers requested review from a team as code owners March 12, 2026 21:12
@llastflowers llastflowers requested a review from liuliu-dev March 12, 2026 21:12
@llastflowers llastflowers merged commit 46f372f into copilot/fix-github-actions-workflow-another-one Mar 12, 2026
17 of 18 checks passed
@llastflowers llastflowers deleted the copilot/fix-github-actions-workflow-failure branch March 12, 2026 21:12
llastflowers added a commit that referenced this pull request Mar 12, 2026
…ybook script (#3004)

* Bump tar and storybook in /docs

Removes [tar](https://github.com/isaacs/node-tar). It's no longer used after updating ancestor dependency [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core). These dependencies need to be updated together.


Removes `tar`

Updates `storybook` from 7.6.21 to 10.2.17
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.2.17/code/core)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 
  dependency-type: indirect
- dependency-name: storybook
  dependency-version: 10.2.17
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Initial plan

* Fix storybook build: remove invalid positional argument `public/static`

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix ESM compatibility in .storybook/main.js (#3005)

* Initial plan

* Fix ESM compatibility: replace require('sass') with ESM import in main.js

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix Storybook 10 build: complete v7→v10 migration (#3007)

* Initial plan

* Initial plan for fixing storybook build failures

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix Storybook 10 build: update packages, add SCSS/Babel/docs support, fix compat shims

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Address code review: remove unused assert dep, rename config var, clean up shim script

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* Fix docs npm install failure due to storybook peer dependency conflicts (#3008)

* Initial plan

* fix: resolve storybook peer dependency conflicts in docs install

- Update @geometricpanda/storybook-addon-badges to ^2.0.5 which supports @storybook/blocks@^8.3.0 (v2.0.0 only supported ^7.0.0)
- Add docs/.npmrc with legacy-peer-deps=true to handle the intentional mixed storybook 8/10 package setup used by shims and webpack aliases

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

* fix: regenerate docs/package-lock.json to resolve storybook binary not found (#3009)

* Initial plan

* fix: regenerate docs/package-lock.json to fix storybook binary not found

Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: llastflowers <55068883+llastflowers@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants