Storybook Addon Incompatible Version - Fix in CI
Storybook addons must match the core major version. After a partial upgrade, an addon on the old major loads against new core APIs and the build (or preview) fails.
What this error means
The build fails loading an addon, or warns that addon and core versions differ. Common right after a major Storybook bump.
WARN Found incompatible Storybook packages:
WARN @storybook/addon-essentials@7.6.0 (expected ^8.0.0)
Error: Cannot read properties of undefined (reading 'channel')Common causes
Partial major upgrade
Core was bumped to a new major but one or more addons were left on the previous major.
Pinned mismatched versions
package.json pins addons to versions that do not match the core range.
How to fix it
Upgrade all Storybook packages together
- Use the Storybook upgrade command to align core and addons.
- Run the doctor to confirm.
npx storybook@latest upgrade
npx storybook doctorAlign versions manually
- Set every @storybook/* package to the same major range and reinstall.
npm install -D @storybook/addon-essentials@^8 @storybook/react-vite@^8 storybook@^8How to prevent it
- Upgrade core and addons in one change; never piecemeal.
- Run
storybook doctorafter dependency changes.