首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >每次构建Storybook都会失败

每次构建Storybook都会失败
EN

Stack Overflow用户
提问于 2019-08-28 01:31:23
回答 1查看 1.9K关注 0票数 2

My Repo:https://github.com/zapify-ui/zapify Unable to do storybook build: npm run build-storybook如何知道确切的错误或如何对其进行事件调试?抛出错误:

代码语言:javascript
复制
(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.

代码片段

npm run build-storybook

系统:

代码语言:javascript
复制
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

错误

代码语言:javascript
复制
(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.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-03 04:24:45

我也有同样的问题。发生这种情况是因为我在不适当的目录中运行命令(在我的例子中是yarn start-storybook --debug-webpack)。确保在zapify/src/中运行命令(在本例中)。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57679653

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档