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

Can't use storyStoreV7 with Flow #17024

Open
lyleunderwood opened this issue Dec 15, 2021 · 4 comments
Open

Can't use storyStoreV7 with Flow #17024

lyleunderwood opened this issue Dec 15, 2021 · 4 comments

Comments

@lyleunderwood
Copy link

Describe the bug

It seems like storyStoreV7 depends on this babelParse utility that has a hardcoded configuration:

// FIXME: we should get this from the project config somehow?
plugins: [
'jsx',
'typescript',
['decorators', { decoratorsBeforeExport: true }],
'classProperties',
],

Because of this, Flow-specific syntax cannot be supported without getting a parser error from babel. I've confirmed that if I replace typescript with flow in the above code, I no longer get the parser error.

To Reproduce

Run storybook with any story files using flow-specific syntax.

System

Environment Info:

  System:
    OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: 1.22.15 - ~/dev/elastic/scramble-com/node_modules/.bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
  Browsers:
    Chrome: 68.0.3440.75
    Firefox: 95.0
  npmPackages:
    @storybook/addon-actions: 6.4.9 => 6.4.9 
    @storybook/addon-essentials: 6.4.9 => 6.4.9 
    @storybook/addon-knobs: 6.3.1 => 6.3.1 
    @storybook/addon-options: ^5.3.21 => 5.3.21 
    @storybook/addons: 6.4.9 => 6.4.9 
    @storybook/builder-webpack5: 6.4.9 => 6.4.9 
    @storybook/manager-webpack5: 6.4.9 => 6.4.9 
    @storybook/react: 6.4.9 => 6.4.9 
    @storybook/theming: 6.4.9 => 6.4.9 

Additional context
N/A

@stale
Copy link

stale bot commented Jan 9, 2022

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jan 9, 2022
@sysofwan
Copy link

Not stale. storyStoreV7 is not respecting babel config, and this is blocking us from migrating.

@stale stale bot removed the inactive label Jan 10, 2022
@valscion
Copy link
Contributor

Looks like #21859 would also fix this issue.

@valscion
Copy link
Contributor

valscion commented May 2, 2023

@lyleunderwood can you check if v7.1.0-alpha.9 has fixed this issue? For reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants