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

ds storybook start - command error #648

Closed
adierkens opened this issue Apr 6, 2021 · 12 comments
Closed

ds storybook start - command error #648

adierkens opened this issue Apr 6, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@adierkens
Copy link
Collaborator

Describe the bug

Errors running ds storybook start from a new design-system.

To Reproduce

npm init @design-systems

cd <repo-name>

yarn storybook

Expected behavior

The storybook command to start

Screenshots

Screen Shot 2021-04-06 at 1 19 39 PM

@adierkens adierkens added the bug Something isn't working label Apr 6, 2021
@gwevans
Copy link

gwevans commented Apr 13, 2021

@adierkens Is there a workaround to get storybook up and running?

@shriuken
Copy link

@gwevans I did this earlier this week, from what I remember I needed to manually install storybook and then update the .storybook/main.js to grep correctly for component stories, and deleted all root-level-generated files that storybook created.

Specifically...

  1. From the root of your design-cli powered repo, install storybook npx sb init
  2. Delete auto-generated storybook files that get created at the root of your project except for the .storybook folder/files
  3. Modify .storybook/main.js to look like:
module.exports = {
  "stories": [
    "../components/**/*.stories.mdx",
    "../components/**/*.stories.@(js|jsx|ts|tsx)"
  ],
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials"
  ]
}

@gwevans
Copy link

gwevans commented Apr 21, 2021

@gwevans I did this earlier this week, from what I remember I needed to manually install storybook and then update the .storybook/main.js to grep correctly for component stories, and deleted all root-level-generated files that storybook created.

Thanks @shriuken, that worked for me.

@danilomartinelli
Copy link

Hello, this is not enough, it is necessary to keep the storybook settings made by the CLI. CSS is not persisted for example.

@danilomartinelli
Copy link

danilomartinelli commented May 13, 2021

I created a new project after that PR but not work yet. (I ran npm init @design-system today)

@yucho
Copy link
Contributor

yucho commented May 16, 2021

@shriuken Can we at least get the patch release for #651 (a.k.a. #652)? The current latest version is broken but this will fix our problem

@adierkens
Copy link
Collaborator Author

Should be released in 2.17.3

@danilomartinelli
Copy link

@adierkens I updated today using ds update to 2.17.3 but i got the following error when i ran yarn run dev (ds dev):
Captura de Tela 2021-05-16 às 12 54 31

@adierkens
Copy link
Collaborator Author

@danilomartinelli #654

@danilomartinelli
Copy link

danilomartinelli commented May 17, 2021

Ok, I'm looking forwarding for this PR. Important to create a version of the CLI with this fix. Thanks!

@danilomartinelli
Copy link

@adierkens I updated to @design-systems/cli": "2.17.4--canary.654.17576.0 and @design-systems/storybook": "2.17.4--canary.654.17576.0 in Root and now is running smoothly. But styles are not being important.
Captura de Tela 2021-05-17 às 08 54 40
Captura de Tela 2021-05-17 às 08 54 45

@adierkens
Copy link
Collaborator Author

Can you open a separate issue?
I'm going to close this one out since this is no longer a problem -- but feel free to open new ones as you hit them (and PRs if you can 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants