loose option warning while building after 6.2.9 upgrade
See original GitHub issueDescribe the bug
We’re upgrading from @storybook/vue 6.1.21 to 6.2.9 an we’re now seeing the following error during Storybook start:
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.
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:
{
"presets": [
[
"@babel/preset-env",
{
"targets": "ie 11, last 2 versions",
"useBuiltIns": "usage",
"corejs": 3,
"loose": true,
"shippedProposals": true
}
]
],
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@vue/babel-preset-jsx"
],
"plugins": ["dynamic-import-node"]
}
},
"plugins": [
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-proposal-class-properties", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
]
}
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
Environment Info:
System:
OS: macOS 11.3
CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
Binaries:
Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.14.11 - ~/Code/snyk/registry/frontend/node_modules/.bin/npm
Browsers:
Chrome: 90.0.4430.93
Firefox: 82.0.2
Safari: 14.1
npmPackages:
@storybook/addon-a11y: ^6.2.9 => 6.2.9
@storybook/addon-actions: ^6.2.9 => 6.2.9
@storybook/addon-backgrounds: ^6.2.9 => 6.2.9
@storybook/addon-docs: ^6.2.9 => 6.2.9
@storybook/addon-queryparams: ^6.2.9 => 6.2.9
@storybook/addon-storysource: ^6.2.9 => 6.2.9
@storybook/preset-typescript: ^3.0.0 => 3.0.0
@storybook/source-loader: ^6.2.9 => 6.2.9
@storybook/vue: ^6.2.9 => 6.2.9
Issue Analytics
- State:
- Created 2 years ago
- Reactions:39
- Comments:38 (5 by maintainers)
Top Results From Across the Web
loose option warning while building after 6.2.9 upgrade #14805
9 an we're now seeing the following error during Storybook start: Though the "loose" option was set to "false" in your @babel/preset-env config,...
Read more >Known issues - Fortinet Documentation Library
After upgrading to 6.4.4, the RADIUS server with non-FortiToken two-factor authentication does not work in the GUI. 704209. When updating ...
Read more >Slider Revolution Changelog
One click of a button will update the Slider Revolution WordPress Builder to the latest available version, directly from our update servers.
Read more >Cisco MDS 9000 Series Release Notes, Release 8.4(2c)
Cisco MDS NX-OS major versions are incremented when significant software features ... lose connectivity to iSCSI targets while the upgrade is in progress....
Read more >Chapter 9 Fire Protection and Life Safety Systems - UpCodes
A fire protection system for which a design option, exception or ... by the State Fire Marshal, when the building owner or occupant...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-beta.2 containing PR #15055 that references this issue. Upgrade today to the
@nextNPM tag to try it out!Closing this issue. Please re-open if you think there’s still more to do.
I tried all above workarounds, but none worked.
What worked for me was downgrading @babel/preset-env to
~7.13.0. The loose warning happened not when I upgraded storybook to 6.2.9, but when @babel/preset-env was upgraded to^7.14.0