Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix missing dep in documentation #426

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

matinzd
Copy link
Contributor

@matinzd matinzd commented Feb 16, 2023

Issue:

node:internal/modules/cjs/loader:988
  throw err;
  ^

Error: Cannot find module '@storybook/core-common'

What I did

Missing @storybook/core-common dependency in documentation.

How to test

  • Run sb-rn-get-stories.

Missing `@storybook/core-common` dependency in documentation.
@matinzd matinzd requested a review from dannyhw as a code owner February 16, 2023 15:59
@matinzd matinzd changed the title fix: missing dep in documentation chore: fix missing dep in documentation Feb 16, 2023
@matinzd
Copy link
Contributor Author

matinzd commented Feb 16, 2023

Even after installing it requires react-dom to work. Should it be like this?

error: Error: Unable to resolve module react-dom from /Users/matin/work/app/node_modules/@storybook/preview-web/dist/modern/renderDocs.js: react-dom could not be found within the project or in these directories:
  node_modules/@storybook/preview-web/node_modules
  node_modules
  1 | import React from 'react';
> 2 | import ReactDOM from 'react-dom';

@dannyhw

@dannyhw
Copy link
Member

dannyhw commented Feb 16, 2023

@matinzd thanks for this contribution 🙇

Yes react-dom is required for one of the storybook dependencies, although its not really used its just a side effect of using @storybook/preview-web to re-use more storybook code.

As you can see I haven't gotten around to udpating these things here.

I've been working on the cli init command so these things should be added automatically when using that
What that means is that this command now works:
npx sb@next init --type react_native

@dannyhw dannyhw merged commit b4f0095 into storybookjs:next-6.0 Feb 16, 2023
@matinzd matinzd deleted the patch-1 branch February 17, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants