Closed JamesIves closed 3 months ago
Did you upgrade with npx storybook@latest upgrade
? From the log you shared, all the unfound exports are related to work recently shipped in 8.1. This makes me think that some of your dependencies didn't get upgraded properly for some reasons.
I did yeah, I get the same error. Tried the usual suspects, such as doing a full delete of node_modules
, etc.
Hmm. That's strange. Can you prune your lock file or run yarn upgrade -S @storybook
?
We encounter the same issue after upgrading to the newest version.
There appears to be a problem with all native addons. When we activate either @storybook/addon-interactions
or @storybook/addon-essentials
it stops building.
Edit: Pruning the lock file did not work.
@valentinpalkovic @vanessayuenn Anything else you recommend here? Could this issue stem from the web-components package?
@JamesIves what happens when you npm ls @storybook/core-events
? Or any of the other problematic packages? I'm wondering if there are multiple versions installed and it's getting the old one for some reason.
Output:
├─┬ @geometricpanda/storybook-addon-badges@2.0.2
│ ├─┬ @storybook/blocks@7.6.17
│ │ ├─┬ @storybook/channels@7.6.17
│ │ │ └── @storybook/core-events@7.6.17 deduped
│ │ ├── @storybook/core-events@7.6.17 deduped
│ │ └─┬ @storybook/docs-tools@7.6.17
│ │ └─┬ @storybook/core-common@7.6.17
│ │ └── @storybook/core-events@7.6.17 deduped
│ ├── @storybook/core-events@7.6.17
│ ├─┬ @storybook/manager-api@7.6.17
│ │ └── @storybook/core-events@7.6.17 deduped
│ └─┬ @storybook/preview-api@7.6.17
│ └── @storybook/core-events@7.6.17 deduped
├─┬ @storybook/addon-actions@8.1.2
│ └── @storybook/core-events@8.1.2
├─┬ @storybook/addon-controls@8.1.2
│ └─┬ @storybook/blocks@8.1.2
│ ├─┬ @storybook/channels@8.1.2
│ │ └── @storybook/core-events@8.1.2 deduped
│ ├── @storybook/core-events@8.1.2
│ ├─┬ @storybook/docs-tools@8.1.2
│ │ ├─┬ @storybook/core-common@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └── @storybook/core-events@8.1.2 deduped
│ ├─┬ @storybook/manager-api@8.1.2
│ │ └── @storybook/core-events@8.1.2 deduped
│ └─┬ @storybook/preview-api@8.1.2
│ └── @storybook/core-events@8.1.2 deduped
├─┬ @storybook/addon-docs@8.1.2
│ ├─┬ @storybook/blocks@8.1.2
│ │ ├─┬ @storybook/channels@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ ├── @storybook/core-events@8.1.2
│ │ ├─┬ @storybook/docs-tools@8.1.2
│ │ │ ├─┬ @storybook/core-common@8.1.2
│ │ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └─┬ @storybook/manager-api@8.1.2
│ │ └── @storybook/core-events@8.1.2 deduped
│ ├─┬ @storybook/csf-plugin@8.1.2
│ │ └─┬ @storybook/csf-tools@8.1.2
│ │ └─┬ @storybook/types@8.1.2
│ │ └─┬ @storybook/channels@8.1.2
│ │ └── @storybook/core-events@8.1.2
│ └─┬ @storybook/preview-api@8.1.2
│ └── @storybook/core-events@8.1.2 deduped
├─┬ @storybook/addon-essentials@8.1.2
│ ├─┬ @storybook/core-common@8.1.2
│ │ └── @storybook/core-events@8.1.2
│ ├─┬ @storybook/manager-api@8.1.2
│ │ ├─┬ @storybook/channels@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └── @storybook/core-events@8.1.2 deduped
│ └─┬ @storybook/preview-api@8.1.2
│ └── @storybook/core-events@8.1.2 deduped
├─┬ @storybook/web-components-webpack5@8.1.2
│ ├─┬ @storybook/builder-webpack5@8.1.2
│ │ ├─┬ @storybook/channels@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ ├─┬ @storybook/core-common@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ ├── @storybook/core-events@8.1.2
│ │ ├─┬ @storybook/core-webpack@8.1.2
│ │ │ ├─┬ @storybook/core-common@8.1.2
│ │ │ │ └── @storybook/core-events@8.1.2
│ │ │ └─┬ @storybook/types@8.1.2
│ │ │ └─┬ @storybook/channels@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └─┬ @storybook/preview-api@8.1.2
│ │ └── @storybook/core-events@8.1.2 deduped
│ ├─┬ @storybook/core-common@8.1.2
│ │ └── @storybook/core-events@8.1.2
│ └─┬ @storybook/types@8.1.2
│ └─┬ @storybook/channels@8.1.2
│ └── @storybook/core-events@8.1.2 deduped
├─┬ @storybook/web-components@8.1.2
│ ├─┬ @storybook/docs-tools@8.1.2
│ │ ├─┬ @storybook/core-common@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └── @storybook/core-events@8.1.2
│ ├─┬ @storybook/manager-api@8.1.2
│ │ ├─┬ @storybook/channels@8.1.2
│ │ │ └── @storybook/core-events@8.1.2 deduped
│ │ └── @storybook/core-events@8.1.2 deduped
│ └─┬ @storybook/preview-api@8.1.2
│ └── @storybook/core-events@8.1.2 deduped
└─┬ storybook-addon-mock@5.0.0
├─┬ @storybook/blocks@8.0.9
│ ├── @storybook/core-events@8.0.9 deduped
│ └─┬ @storybook/docs-tools@8.0.9
│ ├─┬ @storybook/core-common@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ └── @storybook/core-events@8.0.9 deduped
├─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├── @storybook/core-events@8.0.9
├─┬ @storybook/manager-api@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├─┬ @storybook/preview-api@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
└─┬ storybook@8.0.9
└─┬ @storybook/cli@8.0.9
├─┬ @storybook/codemod@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9
├─┬ @storybook/core-common@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├── @storybook/core-events@8.0.9
├─┬ @storybook/core-server@8.0.9
│ ├─┬ @storybook/builder-manager@8.0.9
│ │ └─┬ @storybook/core-common@8.0.9
│ │ ├── @storybook/core-events@8.0.9
│ │ └─┬ @storybook/types@8.0.9
│ │ └─┬ @storybook/channels@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├─┬ @storybook/channels@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├─┬ @storybook/core-common@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├── @storybook/core-events@8.0.9
│ ├─┬ @storybook/manager-api@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ └─┬ @storybook/preview-api@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├─┬ @storybook/csf-tools@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9
├─┬ @storybook/telemetry@8.0.9
│ └─┬ @storybook/core-common@8.0.9
│ ├── @storybook/core-events@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
└─┬ @storybook/types@8.0.9
└─┬ @storybook/channels@8.0.9
└── @storybook/core-events@8.0.9 deduped
It seems that geometricpanda/storybook-addon-badges
is using Storybook 7 dependencies. Please file an issue in the authors repo to update the addon.
If you are using yarn >= v2 as a package manager, you could run yarn up @storybook/* -R
to update all transitive Storybook packages to the latest version. Otherwise, please try to remove all Storybook dependencies, run an install. Then re-add them and run an install again (also skip the badges add-on for now to see whether it is the culprit)
Removed that addon, still getting the error with the following. 🤔
├─┬ @storybook/addon-actions@8.1.4
│ └── @storybook/core-events@8.1.4
├─┬ @storybook/addon-controls@8.1.4
│ └─┬ @storybook/blocks@8.1.4
│ └── @storybook/core-events@8.1.4 deduped
├─┬ @storybook/addon-docs@8.1.4
│ └─┬ @storybook/preview-api@8.1.4
│ └── @storybook/core-events@8.1.4 deduped
├─┬ @storybook/addon-essentials@8.1.4
│ └─┬ @storybook/core-common@8.1.4
│ └── @storybook/core-events@8.1.4 deduped
├─┬ @storybook/manager-api@8.1.4
│ ├─┬ @storybook/channels@8.1.4
│ │ └── @storybook/core-events@8.1.4 deduped
│ └── @storybook/core-events@8.1.4 deduped
├─┬ @storybook/web-components-webpack5@8.1.4
│ └─┬ @storybook/builder-webpack5@8.1.4
│ └── @storybook/core-events@8.1.4 deduped
├─┬ @storybook/web-components@8.1.4
│ └─┬ @storybook/docs-tools@8.1.4
│ └── @storybook/core-events@8.1.4 deduped
└─┬ storybook-addon-mock@5.0.0
├─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├── @storybook/core-events@8.0.9
└─┬ storybook@8.0.9
└─┬ @storybook/cli@8.0.9
├─┬ @storybook/codemod@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9
├─┬ @storybook/core-common@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├── @storybook/core-events@8.0.9
├─┬ @storybook/core-server@8.0.9
│ ├─┬ @storybook/builder-manager@8.0.9
│ │ └─┬ @storybook/core-common@8.0.9
│ │ ├── @storybook/core-events@8.0.9
│ │ └─┬ @storybook/types@8.0.9
│ │ └─┬ @storybook/channels@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├─┬ @storybook/channels@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├─┬ @storybook/core-common@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ ├── @storybook/core-events@8.0.9
│ ├─┬ @storybook/manager-api@8.0.9
│ │ └── @storybook/core-events@8.0.9 deduped
│ └─┬ @storybook/preview-api@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├─┬ @storybook/csf-tools@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9
├─┬ @storybook/telemetry@8.0.9
│ └─┬ @storybook/core-common@8.0.9
│ ├── @storybook/core-events@8.0.9
│ └─┬ @storybook/types@8.0.9
│ └─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
└─┬ @storybook/types@8.0.9
└─┬ @storybook/channels@8.0.9
└── @storybook/core-events@8.0.9 deduped
info => Building manager..
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "ARGTYPES_INFO_REQUEST"
node_modules/@storybook/preview-api/dist/index.mjs:4:85:
4 │ import { STORY_RENDERED, STORY_INDEX_INVALIDATED, UPDATE_GLOBALS, UPDATE_STORY_ARGS, ARGTYPES_INFO_REQUEST, RESET_STORY_ARGS, FORCE_RE_RENDER, FORCE_REMOUNT, SET_GLOBALS, GLOBALS_UPDATED, STORY_AR...
╵ ~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "ARGTYPES_INFO_RESPONSE"
node_modules/@storybook/preview-api/dist/index.mjs:4:208:
4 │ ...GS, FORCE_RE_RENDER, FORCE_REMOUNT, SET_GLOBALS, GLOBALS_UPDATED, STORY_ARGS_UPDATED, ARGTYPES_INFO_RESPONSE, CONFIG_ERROR, SET_CURRENT_STORY, UPDATE_QUERY_PARAMS, PRELOAD_ENTRIES, STORY_SPECIF...
╵ ~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "ARGTYPES_INFO_REQUEST"
node_modules/@storybook/preview-api/dist/index.mjs:4:85:
4 │ import { STORY_RENDERED, STORY_INDEX_INVALIDATED, UPDATE_GLOBALS, UPDATE_STORY_ARGS, ARGTYPES_INFO_REQUEST, RESET_STORY_ARGS, FORCE_RE_RENDER, FORCE_REMOUNT, SET_GLOBALS, GLOBALS_UPDATED, STORY_AR...
╵ ~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "ARGTYPES_INFO_RESPONSE"
node_modules/@storybook/preview-api/dist/index.mjs:4:208:
4 │ ...GS, FORCE_RE_RENDER, FORCE_REMOUNT, SET_GLOBALS, GLOBALS_UPDATED, STORY_ARGS_UPDATED, ARGTYPES_INFO_RESPONSE, CONFIG_ERROR, SET_CURRENT_STORY, UPDATE_QUERY_PARAMS, PRELOAD_ENTRIES, STORY_SPECIF...
╵ ~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/components" for import "Modal"
node_modules/@storybook/addon-controls/dist/manager.js:3:94:
3 │ import { Bar as Bar$1, Form, AddonPanel, Spaced, Badge, WithTooltip, TooltipNote, IconButton, Modal, Button } from '@storybook/components';
╵ ~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "SAVE_STORY_RESPONSE"
node_modules/@storybook/addon-controls/dist/manager.js:4:9:
4 │ import { SAVE_STORY_RESPONSE, SAVE_STORY_REQUEST } from '@storybook/core-events';
╵ ~~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/core-events" for import "SAVE_STORY_REQUEST"
node_modules/@storybook/addon-controls/dist/manager.js:4:30:
4 │ import { SAVE_STORY_RESPONSE, SAVE_STORY_REQUEST } from '@storybook/core-events';
╵ ~~~~~~~~~~~~~~~~~~
✘ [ERROR] No matching export in "global-externals:@storybook/manager-api" for import "experimental_requestResponse"
node_modules/@storybook/addon-controls/dist/manager.js:5:91:
5 │ import { addons, types, useArgs, useGlobals, useArgTypes, useParameter, useStorybookState, experimental_requestResponse } from '@storybook/manager-api';
The list of Storybook dependencies I have installed:
"@storybook/addon-a11y": "8.1.4",
"@storybook/addon-actions": "8.1.4",
"@storybook/addon-controls": "8.1.4",
"@storybook/addon-docs": "8.1.4",
"@storybook/addon-essentials": "8.1.4",
"@storybook/addon-links": "8.1.4",
"@storybook/addon-mdx-gfm": "8.1.4",
"@storybook/addon-webpack5-compiler-swc": "1.0.2",
"@storybook/components": "8.1.4",
"@storybook/manager-api": "8.1.4",
"@storybook/web-components": "8.1.4",
"@storybook/web-components-webpack5": "8.1.4",
"storybook-addon-mock": "5.0.0",
"wc-storybook-helpers": "2.0.2"
and here's my addons export, utility-toolbar is a local addon, hence why I have manager-api installed in my package.json file.
export const addons: StorybookConfig['addons'] = [
'@storybook/addon-controls',
'@storybook/addon-a11y',
'@storybook/addon-essentials',
'@storybook/addon-mdx-gfm',
'@storybook/addon-webpack5-compiler-swc',
'storybook-addon-mock',
'./addons/utility-toolbar',
];
@valentinpalkovic @shilman any other suggestions here? I'm using npm not yarn so the yarn command isn't something I can use.
I've tried narrowing down my dependencies list so I'm not duplicating them with the usage of addon-essentials. Removing addon-essentials
will allow it to build, but that's not really an acceptable solution sadly.
export const addons: StorybookConfig['addons'] = [
'@storybook/addon-a11y',
'@storybook/addon-essentials',
'@storybook/addon-webpack5-compiler-swc',
'storybook-addon-mock',
'./addons/utility-toolbar',
];
and
"@storybook/addon-a11y": "8.1.5",
"@storybook/addon-essentials": "8.1.5",
"@storybook/addon-webpack5-compiler-swc": "1.0.3",
"@storybook/components": "8.1.5",
"@storybook/manager-api": "8.1.5",
"@storybook/web-components": "8.1.5",
"@storybook/web-components-webpack5": "8.1.5",
"wc-storybook-helpers": "2.0.2"
@JamesIves the problem is here:
└─┬ storybook-addon-mock@5.0.0
├─┬ @storybook/channels@8.0.9
│ └── @storybook/core-events@8.0.9 deduped
├── @storybook/core-events@8.0.9
└─┬ storybook@8.0.9
The package manager is hoisting the wrong version of some of the packages. You can force everything to resolve to 8.1.5
using npm overrides, or you can probably uninstall and reinstall storybook-addon-mock
so that it uses 8.1.5
.
Here is storybook-addon-mock
's dependencies. So 8.1.5
matches that version range but npm
is not smart enough to bump the version:
"@storybook/blocks": "^8.0.8",
"@storybook/channels": "^8.0.8",
"@storybook/components": "^8.0.8",
"@storybook/core-events": "^8.0.8",
"@storybook/manager-api": "^8.0.8",
"@storybook/preview-api": "^8.0.8",
To keep it simple you can probably just remove your lockfile and reinstall.
That did the trick!
Glad to hear you got it sorted @JamesIves ! We're working on changes for 8.2 that should make this easier to diagnose/fix.
Describe the bug
Recently upgraded all of my Storybook packages and got the following error:
After disabling all of my addons, the error seems to point towards
@storybook/addon-essentials
and@storybook/addon-controls
. Disabling both of these allow Storybook to build.To Reproduce
Upgrade all Storybook related packages to 8.1.0 or 8.1.1.
System
Additional context
Error does not occur with
8.0.10
.