Storybook "Failed to load preset" in CI
Storybook resolves every entry in addons and framework as a preset. "Failed to load preset" means one of those preset packages could not be imported, usually because it is uninstalled or errors at load time.
What this error means
The build aborts early with "Error: Failed to load preset: \"@storybook/addon-essentials/preset\"" and a nested cause naming the package or a thrown error.
Error: Failed to load preset: "@storybook/addon-essentials/preset" on level 1
at loadPreset (.../node_modules/@storybook/core-common/dist/index.js)
Cannot find module '@storybook/addon-essentials'Common causes
The addon preset package is not installed
An addon referenced in .storybook/main is in config but not in package.json, so CI never installs it and the preset fails to load.
The preset throws during initialization
A preset can fail if it imports a peer that is absent or if it is incompatible with the installed Storybook core version.
How to fix it
Install the addon named in the message
- Read the preset path in the error to identify the addon.
- Add the addon package to devDependencies.
- Reinstall and re-run the Storybook build.
npm install --save-dev @storybook/addon-essentialsMatch addon versions to core
A preset built for a different Storybook major can fail to load. Upgrade addons together with core.
npx storybook@latest upgradeHow to prevent it
- List every addon in
.storybook/mainas an installed devDependency. - Keep addons and core on the same Storybook version.
- Run the Storybook build in CI on a clean install to catch missing presets.