-
Notifications
You must be signed in to change notification settings - Fork 73
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
Directly execute build-archive-storybook if we can't resolve it #917
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an eventual follow-up, I'll note a ticket to add some playwright and cypress tests to CI. So, we know if anything breaks as early as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All worked in a few different test cases for me! 💯
🚀 PR was released in |
I think this change has caused some important errors to be swallowed. I was encountering an error that presented as follows: Building your Storybook
→ Running command: npm exec build-archive-storybook --output-dir /tmp/chromatic--1880-VEzc3CPix51U --webpack-stats-json /tmp/chromatic--1880-VEzc3CPix51U
→ [* ]
✖ Failed to import `@chromatic-com/playwright`, is it installed in `package.json`?
→ Command failed: npm exec build-archive-storybook --output-dir /tmp/chromatic--1880-VEzc3CPix51U --webpack-stats-json /tmp/chromatic--1880-VEzc3CPix51U
ℹ To run `chromatic --playwright` you must have `@chromatic-com/playwright` installed. So I spent a while debugging my dependencies and trying to find out why Error: Chromatic archives directory cannot be found: /home/runner/work/_/_/test-results/chromatic-archives
Please make sure that you have run your E2E tests, or have set the CHROMATIC_ARCHIVE_LOCATION env var if the output directory for the tests is not in the standard location. Looking at this change, there's this comment: // If we tried to run the E2E package's bin directly (due to being in the action)
// and it failed, that means we couldn't find it. This probably means they haven't
// installed the right dependency or run from the right directory I think that's probably the wrong logic because |
Thanks for the investigation @shrink and that's a great point! |
In the GitHub action, we cannot import peer dependencies (or anything really). However we should be able to
npm exec <bin-command>
inside the user's project dir, if the package is installed.📦 Published PR as canary version:
10.9.3--canary.917.7834066638.0
✨ Test out this PR locally via: