question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem with custom config folder instead of .storybook

See original GitHub issue

Hello,

Describe the bug I’m getting an error on remote platforms (on localhost runs without problems) (node:901) UnhandledPromiseRejectionWarning: Error: => Create a storybook config file in "config/storybook/config.{ext}". when using a custom configuration folder an setting it with the -c argument.

To Reproduce I’m building my project on a PaaS, where there is necessary to provide a script to build the project, in my case it’s like this.

#!/bin/bash
npm config delete prefix
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
nvm install 8.11.4
npm install yarn -g
yarn install
yarn build
yarn build-storybook

My project structure is:

config
 storybook
   config.js
   webpack.config.js
package.json

I’m using a custom configuration folder, so my build-storybook script executes this command:

build-storybook -c config/storybook -o storybook (I’ve also used ./config/storybook)

But it returns the described error.

The thing is that when using the default .storybook on the root folder, and setting the script to build-storybook -o storybook it builds without problems. I’m thinking that there is a problem with the resolution of the given custom folder path.

Expected behavior Build storybook without problems.

Screenshots image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Gilbert-Aducommented, Mar 20, 2020

having the same bug. anyone with suggestions as to how to solve this?

2reactions
stale[bot]commented, Jul 21, 2019

Hey there, it’s me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Storybook
Configure Storybook. Storybook is configured via a folder called .storybook , which contains various configuration files. Note that you can change the folder...
Read more >
How to configure Storybook to run from a directory other than ...
I'm trying to configure Storybook to run from a directory that is not the root of the project and I'm having a little...
Read more >
Configuring Storybook: 6 Tips You Can't Miss | by Zheng Li
Tip 1: The Storybook has its default webpack configuration, when trying to import your current webpack config or add your own rules, DO...
Read more >
CLI • Chromatic docs
Relative path from where you run Chromatic to your Storybook config directory. Use with --only-changed and --storybook-build-dir when using a custom --config- ...
Read more >
@storybook/builder-vite - npm
Customize Vite config ... The builder will not read your vite.config.js file by default. In .storybook/main.js (or whatever your Storybook config ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found