Skip to content

Detect storybook #495

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

Closed
ascorbic opened this issue Jul 7, 2021 · 2 comments · Fixed by #496
Closed

Detect storybook #495

ascorbic opened this issue Jul 7, 2021 · 2 comments · Fixed by #496

Comments

@ascorbic
Copy link
Contributor

ascorbic commented Jul 7, 2021

In auto-installed sites we may have detected that the site is using Next.js, but the site may actually be building the Storybook. This currently causes the build to fail. This is a common enough scenario to deserve special handling, where we check the build command and if it's calling build-storybook then skip the plugin.

@KyleRoss
Copy link

@ascorbic I just upgraded to the latest version of this plugin and now my builds are failing. I have a bit of a unique use case where I'm building a Next.js site and Storybook, outputting the storybook static files into the out directory on build. So I'm actually building a Next.js site, but due to my build command containing build-storybook as well, this plugin gives the "Site seems to be building a Storybook rather than the Next.js site, so the Essential Next.js plugin will not run." error and does not deploy.

We have a very aggressive deadline, so I may need to downgrade to the version prior to this change for now, but I'd like to see the ability to disable this somehow. While we're on an enterprise plan, I'm not sure it's worth going through the trouble of setting up a second site specifically for storybook.

@ascorbic
Copy link
Contributor Author

Hello @KyleRoss,
This sounds like a job for an env var, which I'm planning to add probably this week. You'll be able to set something like NEXT_STATIC_EXPORT=false. I'd agree that the short-term fix is to downgrade, and then you can switch to the env var when we release that soon.

serhalp pushed a commit that referenced this issue Jun 13, 2024
* chore: fix next version in e2e report

* chore: don't report to slack on non-scheduled runs

* another attempt at not reporting to slack on non-schedule runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants