-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
loose option warning while building after 6.2.9 upgrade #14805
Comments
Had the same warning on the fresh install of storybook. I tried to add this plugin in However, warnings went away when I manually added
I suppose this should be in the default Babel config, or I missing something? |
Interesting... It would be great if we could find an official solution to this without needing to fork and fix in this way. |
I tried manually installing the |
That's what I see too. Would be good to get rid of the warnings. 😕 |
Updating to the latest |
Adding addons: [{
name: '@storybook/addon-docs',
options: {
babelOptions: {
plugins: [
['@babel/plugin-proposal-private-property-in-object', {
loose: true
}],
],
},
},
}, ], Read also: babel/babel#11622 |
Unfortunately making that same change for me didn't make any difference. |
@RyanHavoc Sorry, did you try adding in in |
Yes, I tried adding those to my babel config in
But no joy. |
Possibly there's something different with Vue instance. This same setup don't remove the warning for me. |
Same here, none of the solutions above do work in our setup. After Upgrading to latest pre release we do also get a lot of these warnings "Field 'browser' doesn't contain a valid alias configuration". Storybook doesn't start. |
We are seeing this issue in |
We are also seeing this issue and none of the workarounds works for us either. ( |
I've found that adding:
To our |
I tried all above workarounds, but none worked. What worked for me was downgrading @babel/preset-env to |
Same here. Tried everything above with no success. Downgrade to |
@kuk941025 Thanks, indeed, it does fix the issue for us as well. @erykpiast Initially, we also tried downgrading the |
You're right @danantal, I have multiple versions indeed and Storybook is still using I'm not using Yarn, but uninstalling Storybook packages via NPM and installing them again did the trick. Poor-man resolution forcing in action 🙃 |
This revealed storybookjs/storybook#14805, not sure if we want to merge it with these warnings in the log
* Unpin and upgrade babel to latest version Depends on sourcegraph/babel-plugin-transform-react-hot-loader-wrapper#110 * Update plugin to unbreak build This revealed storybookjs/storybook#14805, not sure if we want to merge it with these warnings in the log
After testing I can confirm that the new beta mentioned in #14805 (comment) removes the warnings. |
@shilman I can't seem to use the latest |
@lifeiscontent meaning upgrading doesn't solve it for you? |
@shilman I'm not sure, I think there might be some code outside of this issue preventing me from using it. When I upgraded I couldn't get storybook to run with the latest package pinned to |
@lifeiscontent Do you have a repro I can look at? |
ci config upgrade storybook storybookjs/storybook#14805
ci config upgrade storybook storybookjs/storybook#14805
ci config upgrade storybook storybookjs/storybook#14805
ci config upgrade storybook storybookjs/storybook#14805
@shilman I also still have the problem, even after trying all the solutions above. I'm on 6.3.1 and come from 6.2.5.
stack trace
.storybook/.babelrc.js const rootConfig = require("../babel.config");
/**
* 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.
*/
const patchedPlugins = rootConfig.plugins.map((plugin) => {
if (
[
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-private-methods",
].includes(plugin)
) {
return [plugin, { loose: true }];
}
return plugin;
});
// Add flow to transpile some dependencies
module.exports = {
...rootConfig,
plugins: patchedPlugins.concat(
"@babel/plugin-transform-flow-strip-types"
),
}; .storybook/main.js module.exports = {
stories: [
"../shared/**/*.stories.mdx",
"../shared/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: [
"@storybook/addon-docs",
"@storybook/addon-essentials",
"storybook-addon-designs"
],
}; |
@pybuche hi, can you try It's to see if there's any duplication in the dependencies. |
@thien-do Sorry for the late answer. Here are the @babel/plugin-proposal-class-properties
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-private-property-in-object
This is the result just after launching |
@pybuche I ran into this exact issue, and discovered that editing my main Babel config (not my Sadly I cannot repro this on a clean repo, and it's on a closed-source project, so I can't provide a good example. 😢 |
@vivshaw thanks for the tip! |
Getting this error again when upgrading |
adding
to my |
* Update Wikibase from branch 'master' to 3cab92be81ee1e8d511ae4529233aeaf72875950 - Merge "bridge: update storybook" - bridge: update storybook In particular, this fixes all those '"loose" option' warnings that were littering our logs. See also storybookjs/storybook#14805 Change-Id: Ie0eab21be94fcc1b519c8e8534a3695ae5c58e1b
In particular, this fixes all those '"loose" option' warnings that were littering our logs. See also storybookjs/storybook#14805 Change-Id: Ie0eab21be94fcc1b519c8e8534a3695ae5c58e1b
Describe the bug
We're upgrading from
@storybook/vue
6.1.21
to6.2.9
an we're now seeing the following error during Storybook start:This warning was shown multiple times during the build and then eventually I'd get an error and the build would fail.
We have a
.bashrc
file so I updated it to this:This has helped somewhat but we still get the error, however Storybook does start.
To Reproduce
All I did to see these issues was
npx sb@latest upgrade
and after starting storybook again I see the warnings.System
The text was updated successfully, but these errors were encountered: