question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Odd 'loose' mode configuration must be the same...

See original GitHub issue

'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties and @babel/plugin-proposal-private-methods

I’m getting this error even though I don’t use either of the proposals explicitly. Thus, it’s kinda hard for me to configure their loose modes 😆 I think they are brought in through a preset.

My config is:

  "babel": {
    "plugins": [
      "babel-plugin-macros"
    ],
    "presets": [
      [
        "@babel/preset-env",
        {
          "useBuiltIns": false,
          "shippedProposals": true,
          "debug": false
        }
      ]
    ]
  },
  "babelMacros": {
    "styledComponents": {
      "pure": true
    }
  },

I’ve recently done yarn upgrade and this error showed up. Summary of babel versions that got upgraded in yarn.lock:

  • 7.9.6 → 7.10.0: core, runtime, compat-data, generator, helpers, parser, traverse, types, helper-compilation-targets, helper-create-class-features-plugin, helper-replace-supers, …
  • 7.8.6 → 7.10.0: template
  • 7.8.3 → 7.10.0: helper-member-expressions-to-function, plugin-transform-spread
  • 7.9.0 → 7.10.0: plugin-transform-for-of

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

41reactions
danielbayerleincommented, May 27, 2020

I have the same problem with Storybook (v6.0.0-beta.15).

15reactions
c-fratercommented, Jun 4, 2020

After a lot of debugging, we found that simply adding the plugins (without options) seems to work.

plugins: [
      '@babel/plugin-proposal-class-properties',
      '@babel/plugin-proposal-private-methods',
    ],

We don’t use the plugins directly in our app but it seems they’re included in env. Without them listed in plugins it fails, listing them with loose: true also fails so I can only assume that the ‘default’ doesn’t trigger the warning

I’ll try and upload the lockfile with the business-sensitive bits removed later today

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel conflict running storybook - Stack Overflow
When I run yarn storybook , I get this error. 'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties and ...
Read more >
Fix warning about babel - web log about tech, and more
Odd 'loose' mode configuration must be the same… Read other posts. GitHub Actions deploing Nuxtjs page to S3 / CloudFront →.
Read more >
babel/plugin-proposal-private-methods
Note: The loose mode configuration setting must be the same as @babel/plugin-proposal-class-properties . When true, private methods will be assigned ...
Read more >
Cisco APIC Layer 2 Networking Configuration Guide, Release ...
Describes how to configure physical ports, port channels, virtual port channels, and connections to FEX devices.
Read more >
@babel/plugin-proposal-private-methods - Package Manager
Configuration · Advanced · API. @babel/plugin-proposal-private-methods. owner babel67.3mMIT7.18.6 vulns 0 vulnerabilities. This plugin transforms private ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found