storybookjs/storybook

[Bug]: flow typecheck fails due to malformed_package_json

開放

#25,202 建立於 2023年12月12日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (10,058 個分叉)batch import
bugbuilder-webpack5compatibility with other toolshelp wanted

倉庫指標

星標
 (89,909 顆星)
PR 合併指標
 (平均合併 7天 22小時) (30 天內合併 184 個 PR)

描述

Describe the bug

Flow responds with an error when I upgrade storybook to the latest version.

To Reproduce

Run npx storybook@latest upgrade on a project that had storybook@7.6.3 to update the storybook to 7.6.4. This was also a problem when I ran that script to update storybook from 7.5.3 to 7.6.3.

Run npx flow.

Error message:

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
node_modules/@storybook/preset-react-webpack/node_modules/resolve/test/resolver/malformed_package_json/package.json:2:1

Unexpected end of input, expected the token }

     1│ {
     2│



Found  1 error

System

ubuntu2004 and on a macbook pro with sonoma 14.1.2

Additional context

I looked up the file in the node_modules directory, and it just has a single open curly bracket.

Reverting @storybook/react-webpack5 to 7.5.3 resolves the flow error, but that package isn't kept in sync with the other storybook packages.

Running storybook locally works as expected with react-webpack5@7.6.4

貢獻者指南