-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Cannot run storybook after upgrading from 6.0.0-alpha30 to 6.0.0-beta.x #10939
Comments
Maybe related to #10783 |
I am seeing the same error. I think the problem is what it says on the box: I can at least fix it with stupid stuff like this config:
With that it just runs. |
I get the same error in my CRA app (without much custom code in .storybook at all). |
I started getting this error after upgrading from 6.0.0-beta.13 to 6.0.0-beta15 |
Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.16 containing PR #10941 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
That fixed it for me! Thanks for the quick fix! |
Works great, thanks! |
@shilman I am experiencing the same thing following the guide here with version 6.0.0-beta.31. Only difference is I am adding it to an existing React project (but one previously without storybook at all). |
@tannerbaum What version of docs has been installed ? We're seing that the version is not the one from next which can explain your issue. If version is different, could you upgrade to @next ? |
@tooppaaa So I will admit that I hadn't installed the docs separately as mentioned in step 3, that is my bad 😅 I thought it would in theory run without that add-on. So I did what the guide said and ran
Could provide all the dependencies if helpful but the storybook ones are here:
For what it is worth the current version of Storybook does work in this project using the init cli command. |
We fixed the error by simply turning |
Does somebody with this problem have a public repro repo they can share? |
@shilman I can share one with just you 👍 |
I upgraded from |
@KevinGhadyani-minted any chance your repo is public to investigate a bit more ? |
Sadly no :/. The best I can do is show this error:
Here's the {
"presets": [
[
"@babel/preset-env",
{
"loose": true, // Need this for Storybook v6 beta.
"modules": false
}
],
"@babel/preset-react",
[
"@emotion/babel-preset-css-prop",
{
"sourceMap": true,
"autoLabel": true
}
]
],
"plugins": [
"react-docgen",
"react-hot-loader/babel",
[
"@babel/plugin-proposal-class-properties",
{
loose: true, // Need this for Storybook v6 beta.
}
],
"@babel/plugin-proposal-object-rest-spread",
]
} |
For what it’s worth, I encountered this and fixed it by removing all Babel packages, installing, then adding them back and installing. |
@shincurry @KevinGhadyani-minted @PascalPixel is the last answer helping you ? Is that still an issue for you on the latest 6.x ? |
I have this issue when running build-storybook |
Which v6 version? Something released as of the last few weeks? |
I couldn't work around this error without setting the plugins to "loose", which I ideally didn't want to do. For now, my workaround was to take my config file and modify it, just for storybook. I have
const projectConfig = require('../.babelrc.js')
/**
* Take the project config, but set loose to true for class properties and private methods for Storybook.
*
* As Storybook updates, it's probably worth trying to delete this file and seeing if it will run without
* the workaround.
*/
projectConfig.plugins = projectConfig.plugins.map((plugin) => {
if (
[
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
].includes(plugin)
) {
return [plugin, { loose: true }]
}
return plugin
})
module.exports = projectConfig |
Just fixed this in a project running storybook@6.0.26 by making sure babel and presets+plugins are up-to-date, delete |
@drewjs Removing Sometimes, your In general, removing |
@KevinGhadyani-minted I agree not an ideal solution and it does come at a risk, but occasionally I've had lock files go out of sync and causes issues. Just sharing for others to try as a potential fix, but it’s good idea to draw attention to other issues it could create if not careful. |
@shilman I was able to reproduce this https://github.com/hydrosquall/recogito-client-core/tree/cameron.yick/add-date-picker
Error message in the terminal: https://a.cl.ly/ApuGvOdG I'm new to the project, so I'm hesitant to rearrange their Hope this helps! Update: I got storybook running by upgrading all |
Finally decided to upgrade to storybook (and other plugins) 6.1.11 but encountered this issue. Tried the following workarounds:
So far none worked. Oddly enough I didn't have any issue on 6.0 |
It might be helpful for some. I stopped having issues with a Storybook v6 upgrade related to Babel. I had other completely unrelated issues, but that particular one was fixed. |
Describe the bug
I try to upgrade Storybook from 6.0.0-alpha30 to 6.0.0-beta.15.
And I didn't change any other files except package.json and yarn.lock.
it throw some errors.
To Reproduce
Steps to reproduce the behavior:
yarn upgrade-interactive
yarn storybook
Code snippets
.storybook/main.js
.storybook/manager.js
.storybook/preview.js
.storybook/tsconfig.json
.storybook/webpack.config.js
repo: https://github.com/HackPlan/UUI/tree/a4b8762a9837e926a5e0ca256a09dc6e5b04bab0
storybook config in
.storybook
directoryAdditional context
The text was updated successfully, but these errors were encountered: