-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: Dependency on sharp in @storybook/nextjs should be optional #25075
Comments
As a somewhat undesirable workaround for this, we're currently using the "overrides": {
"@storybook/nextjs": {
"sharp": "npm:dry-uninstall"
}
} |
How I can reproduce this issue? |
@matmannion Any interest in contributing a PR to solve this? We've documented how to contribute and there's also a |
@LifeAsDev I'm having the exact same problem. |
@raydot To reproduce this error I need a macOs that I don't have, can you solve it? |
@LifeAsDev I should have mentioned my specs: I'm working in Windows 10 Enterprise. I think the key problem, though, is that @matmannion and I are both working in secure environments that have things like whitelists and proxies between us and the web. In my case, the issue was solved by adding an |
I had a same kind of issue ? Might need to open a new ticket for it but installing with I've resolved the issue by running: The sharp binaries are then available in the |
when try #25075 (comment) storybook stuck in loading state. Any workaround sharp not installing after proxy setup. Nodejs 20.10 LTS version using, npm 10+ |
Describe the bug
As of 7.6.0 @nextjs/storybook has a direct dependency on sharp, in order to handle AVIF processing. This is an optional dependency in nextjs itself so presents an issue for anyone (like us) who are running Storybook inside of a tightly constrainted CI environment - we have no need for AVIF or Next.js's image optimisation, so we don't need the sharp dependency and don't want to whitelist the download domains in order for it to download binaries at install time.
It would be better for this to be an optional dependency, and to throw an error if an AVIF file is detected - this would match Next's own behaviour (https://nextjs.org/docs/messages/install-sharp)
To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: