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

'loose' mode configuration 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). #1037

Closed
NullVoxPopuli opened this issue Dec 5, 2021 · 1 comment

Comments

@NullVoxPopuli
Copy link
Collaborator

This is a weird one -- potentially also related to emberjs/ember-cli-babel#419

Found: https://github.com/NullVoxPopuli/ember-statechart-component/runs/4422910549?check_suite_focus=true#step:5:40

ERROR in ./assets/dummy.js
Module build failed (from ../../../../../home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
$TMPDIR/embroider/41c7ff/tests/dummy/assets/dummy.js: 'loose' mode configuration 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).

    at enableFeature (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/@babel/helper-create-class-features-plugin/lib/features.js:51:13)
    at PluginPass.pre (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/@babel/helper-create-class-features-plugin/lib/index.js:78:35)
    at transformFile (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/@babel/core/lib/transformation/index.js:94:27)
    at transformFile.next (<anonymous>)
    at run (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/@babel/core/lib/transformation/index.js:33:12)
    at run.next (<anonymous>)
    at Function.transform (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/@babel/core/lib/transform.js:25:41)
    at transform.next (<anonymous>)
    at step (/home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/gensync/index.js:261:32)
    at /home/runner/work/ember-statechart-component/ember-statechart-component/node_modules/gensync/index.js:273:13

What's weird about this error, is that this addon isn't doing anything with private methods.... so... babel is continuing to confuse me and it's compounding. Is babel even a good idea? lol

@NullVoxPopuli
Copy link
Collaborator Author

NullVoxPopuli commented Dec 5, 2021

doh! nevermind. I forgot my ember-cli-build.js had this:

  let app = new EmberAddon(defaults, {
    babel: {
      loose: true,
      plugins: [
        // ['@babel/plugin-proposal-private-property-in-object', { loose: true }],
        ['@babel/plugin-proposal-private-methods', { loose: true }],
      ],
    },
  });

while I was trying to find a work-around for: emberjs/ember-cli-babel#419

removing all that config fixes this issue

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

No branches or pull requests

1 participant