What happened
I added @storybook/addon-mcp@0.7.0 to a clone of radix-ui/primitives (commit df8f89ac, apps/storybook, storybook 9.1.20). The install succeeded: the published peer range ^0.0.0-0 || ^9.1.16 || ^10.0.0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0 || ^10.4.0-0 || ^10.5.0-0 admits 9.1.20. storybook build then failed while loading presets:
Error [ERR_INTERNAL_ASSERTION]: Unexpected module status 0
That error masks the cause. Importing the preset directly exposes it:
SyntaxError: The requested module 'storybook/internal/common' does not provide an export named 'importModule'
dist/preset.js imports importModule from storybook/internal/common, and storybook 9.1.20 does not export it. importModule appears nowhere in 9.1.20's dist/common/index.js or index.cjs, while the preset's other import from the same module, normalizeStoryPath, is present.
Fixing the import would not be enough on 9.1.x
The manifest feature is absent from storybook core on the 9.1 line under both of its flag spellings. Grep counts over the published storybook dist tarballs, occurrences anywhere in dist:
| storybook |
componentsManifest |
experimentalComponentsManifest |
importModule in dist/common |
| 9.1.17 |
0 |
0 |
0 |
| 9.1.20 |
0 |
0 |
0 |
| 10.0.0, 10.0.8 |
0 |
0 |
2 |
| 10.1.0, 10.1.10, 10.1.11 |
0 |
3 |
2 |
| 10.2.0, 10.2.10, 10.2.14, 10.2.19 |
0 |
3 |
2 |
| 10.3.0 |
7 |
0 |
2 |
The feature enters core at 10.1.0 under the experimental spelling, and the stable spelling replaces it at 10.3.0. On 9.1.x neither spelling exists, so the ^9.1.16 floor admits a version line where the preset cannot load and, with the import fixed, would find no manifest feature to use. Builds confirm the table at three points: the preset fails to load at 9.1.20, and storybook build writes storybook-static/manifests/components.json with the addon alone at 10.3.5 and 10.4.2, and with the addon plus features: { componentsManifest: true } at 10.5.3. I have not tested whether the addon produces a manifest on the 10.1 to 10.2 band with the experimental flag.
Reproduction
git clone https://github.com/radix-ui/primitives and check out df8f89ac
pnpm install
pnpm --dir apps/storybook add -D @storybook/addon-mcp@0.7.0
- Add
'@storybook/addon-mcp' to the addons array in apps/storybook/.storybook/main.ts
pnpm --dir apps/storybook run build
Fails during preset loading. Reproduced on Node 22.20.0 and Node 24.14.0 (the repo's .nvmrc pins 24), macOS, pnpm 11.5.0.
Expected
Either the peer floor matches a version line the addon works on (10.3.x through 10.5.x is demonstrated; 10.1 to 10.2 carries only the experimental flag and is untested), or the preset fails on 9.1.x with a message naming the minimum version. Every published version from 0.1.4 through 0.7.0, prereleases included, carries the ^9.1.16 floor, and 0.0.9 was looser still at >=9.0.0, so pinning an older addon does not avoid this.
What happened
I added
@storybook/addon-mcp@0.7.0to a clone of radix-ui/primitives (commit df8f89ac,apps/storybook, storybook 9.1.20). The install succeeded: the published peer range^0.0.0-0 || ^9.1.16 || ^10.0.0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0 || ^10.4.0-0 || ^10.5.0-0admits 9.1.20.storybook buildthen failed while loading presets:That error masks the cause. Importing the preset directly exposes it:
dist/preset.jsimportsimportModulefromstorybook/internal/common, and storybook 9.1.20 does not export it.importModuleappears nowhere in 9.1.20'sdist/common/index.jsorindex.cjs, while the preset's other import from the same module,normalizeStoryPath, is present.Fixing the import would not be enough on 9.1.x
The manifest feature is absent from storybook core on the 9.1 line under both of its flag spellings. Grep counts over the published
storybookdist tarballs, occurrences anywhere indist:componentsManifestexperimentalComponentsManifestimportModulein dist/commonThe feature enters core at 10.1.0 under the experimental spelling, and the stable spelling replaces it at 10.3.0. On 9.1.x neither spelling exists, so the ^9.1.16 floor admits a version line where the preset cannot load and, with the import fixed, would find no manifest feature to use. Builds confirm the table at three points: the preset fails to load at 9.1.20, and
storybook buildwritesstorybook-static/manifests/components.jsonwith the addon alone at 10.3.5 and 10.4.2, and with the addon plusfeatures: { componentsManifest: true }at 10.5.3. I have not tested whether the addon produces a manifest on the 10.1 to 10.2 band with the experimental flag.Reproduction
git clone https://github.com/radix-ui/primitivesand check outdf8f89acpnpm installpnpm --dir apps/storybook add -D @storybook/addon-mcp@0.7.0'@storybook/addon-mcp'to theaddonsarray inapps/storybook/.storybook/main.tspnpm --dir apps/storybook run buildFails during preset loading. Reproduced on Node 22.20.0 and Node 24.14.0 (the repo's
.nvmrcpins 24), macOS, pnpm 11.5.0.Expected
Either the peer floor matches a version line the addon works on (10.3.x through 10.5.x is demonstrated; 10.1 to 10.2 carries only the experimental flag and is untested), or the preset fails on 9.1.x with a message naming the minimum version. Every published version from 0.1.4 through 0.7.0, prereleases included, carries the ^9.1.16 floor, and 0.0.9 was looser still at
>=9.0.0, so pinning an older addon does not avoid this.