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

TypeError: Class constructors cannot be invoked without 'new' #623

Closed
rodriguezmarting opened this issue Apr 17, 2023 · 1 comment
Closed

Comments

@rodriguezmarting
Copy link

rodriguezmarting commented Apr 17, 2023

Updating to latest postcss version using Broccoli is throwing a type error, tried with different approaches but none worked:

Using "broccoli-postcss": "6.1.0" which uses "postcss": "8.1.4"
Same error using "broccoli-postcss-single": "5.0.2" which also uses "postcss": "8.1.4"

image

My brocfile:

...
const postcss = require("broccoli-postcss");
...

export default ({env}) => {

  ...

  const cssPlugins = {
    plugins: [
      {
        module: postcssMixins
      },
      {
        module: postcssMomentumScrolling
      },
      {
        module: postcssPresetEnv,
        options: {
          stage: 0, 
          preserve: false,
        }
      },
    ]
  };

  ...


  postcss("css", {plugins: cssPlugins})

  ...

After adding the new keyword it throws the following error:

image

@rodriguezmarting
Copy link
Author

rodriguezmarting commented Apr 17, 2023

This needs to be addressed here based on: postcss/postcss#1833

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