You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgrade from 6 to 7 today and have so many issues. This is a react native project.
I've found some issues have to do with some of the addon-ondevice-* pakages with not being able to find @storybook/global. I removed those dependencies to make this issue maybe a little easier.
I tried to use the upgrade with npx storybook@latest upgrade and that fails with the following
Error: Command failed with exit code 1: yarn info --name-only --recursive "storybook" "@storybook/cli" "storybook,@storybook/cli"
Usage Error: No package matched your request
$ yarn info [-A,--all] [-R,--recursive] [-X,--extra #0] [--cache] [--dependents] [--manifest] [--name-only] [--virtuals] [--json] ...
at makeError (<path>\node_modules\execa\lib\error.js:60:11)
at handlePromise (<path>\node_modules\execa\index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Yarn2Proxy.executeCommand (<path>\node_modules\@storybook\cli\dist\generate.js:56:1607)
at async Yarn2Proxy.findInstallations (<path>\node_modules\@storybook\cli\dist\generate.js:60:4629)
at async getInstalledStorybookVersion (<path>\node_modules\@storybook\cli\dist\generate.js:455:2297)
at async doUpgrade (<path>\node_modules\@storybook\cli\dist\generate.js:456:4728)
at async withTelemetry (<path>\node_modules\@storybook\core-server\dist\index.js:65:3948)
at async upgrade (<path>\node_modules\@storybook\cli\dist\generate.js:463:1752)
const App: React.FC = () => {
return (
... app view stuff
);
};
// Default to rendering your app
let AppEntryPoint = App;
// Render Storybook if storybookEnabled is true
if (Constants.expoConfig.extra.storybookEnabled === true) {
console.warn('Storybook mode enabled');
AppEntryPoint = require('../.storybook').default;
}
registerRootComponent(AppEntryPoint);
When I compile and run I get this in the terminal
ERROR in ./node_modules/@storybook/react-native/dist/preview.js:25
Module not found: Package path ./dist/entry-preview-docs is not exported from package <path>\node_modules\@storybook\react (see exports field in <path>\node_modules\@storybook\react\package.json)
23 | });
24 | module.exports = __toCommonJS(preview_exports);
> 25 | var import_entry_preview_docs = require("@storybook/react/dist/entry-preview-docs");
26 | var import_docs_tools = require("@storybook/docs-tools");
27 | var preview_default = {
28 | argTypesEnhancers: [import_docs_tools.enhanceArgTypes],
It still attempts to run and I get this in the browser console
Uncaught Error: Cannot find module '@storybook/react/dist/entry-preview-docs'
at webpackMissingModule (preview.js:25:1)
at ./node_modules/@storybook/react-native/dist/preview.js (preview.js:25:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./.storybook/storybook.requires.ts (storybook.requires.ts:25:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./.storybook/index.ts (.(:31:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./src/App.tsx (App.tsx:58:1)
at __webpack_require__ (bootstrap:24:1)
at startup:6:1
at startup:6:1
kyle-mcknight
changed the title
[Bug]: Critical dependency error, and multiple module not found errors when upgrading from 6 to 7
[Bug]: Module not found entry-preview-docs
Feb 11, 2024
Describe the bug
I upgrade from 6 to 7 today and have so many issues. This is a react native project.
I've found some issues have to do with some of the addon-ondevice-* pakages with not being able to find @storybook/global. I removed those dependencies to make this issue maybe a little easier.
I tried to use the upgrade with
npx storybook@latest upgrade
and that fails with the followingSo I followed the migration guide and after that
package.json dependencies
Metro's metro.config.js
Storybook's index.ts
Storybook's main.ts
Storybook's preview.tsx
My app's entry point
When I compile and run I get this in the terminal
It still attempts to run and I get this in the browser console
To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: