简体   繁体   中英

Storybook build fails everytime

My Repo: https://github.com/zapify-ui/zapify Unable to do storybook build: npm run build-storybook How to know the exact error or how to event debug it? Throws an error:

(node:46619) UnhandledPromiseRejectionWarning: Error: => Create a storybook config file in "./.storybook/config.{ext}".
    at createPreviewEntry (/Users/piyushmehta/zapify/node_modules/@storybook/core/dist/server/preview/entries.js:21:11)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
(node:46619) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:46619) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Code snippets

npm run build-storybook

System:

Environment Info:

  System:
    OS: macOS 10.15
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  Binaries:
    Node: 11.8.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.5.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 76.0.3809.132
    Safari: 13.0
  npmPackages:
    @storybook/addon-actions: ^5.1.11 => 5.1.11
    @storybook/addon-info: ^5.1.11 => 5.1.11
    @storybook/addon-links: 5.1.11 => 5.1.10
    @storybook/addon-storysource: ^5.1.11 => 5.1.11
    @storybook/react: 5.1.11 => 5.1.10
    @storybook/storybook-deployer: ^2.8.1 => 2.8.1
  npmGlobalPackages:
    @storybook/cli: 5.1.11

Error

(node:46619) UnhandledPromiseRejectionWarning: Error: => Create a storybook config file in "./.storybook/config.{ext}".
    at createPreviewEntry (/Users/piyushmehta/zapify/node_modules/@storybook/core/dist/server/preview/entries.js:21:11)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
(node:46619) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:46619) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I had the same proplem. It has happend because I run command ( yarn start-storybook --debug-webpack in my case) within non-appropriate direcotry. Be sure that you run your command within zapify/src/ (in you case).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM