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.

TypeError: Class constructor extractor cannot be invoked without 'new'

See original GitHub issue

I’m trying to build and run. My config:

buildModules: [
    'nuxt-purgecss',
...
],
  build: {
    // analyze: true,
    crossorigin: true,
    extractCSS: true
  }

Full error:

 FATAL  Class constructor extractor cannot be invoked without 'new'                        06:19:49

  at m (node_modules/purgecss/lib/purgecss.js:1:3149)
  at x.extractSelectorsFromFiles (node_modules/purgecss/lib/purgecss.js:1:5172)
  at async x.purge (node_modules/purgecss/lib/purgecss.js:1:7663)
  at async module.exports.runPluginHook (node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:1:1968)

Help?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
urbgimtamcommented, May 20, 2020

Having the exact same issue.

Solved it by deleting the whole node_modules directory and reinstalling - I’m using npm. Sorry for the trouble (although I’m pretty sure I’ve done that previously).

0reactions
manniLcommented, Sep 30, 2022

stale

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class constructor extractor cannot be invoked without 'new' #57
Get an error with the PurgeCss Version 2.0.5 and gulp-postcss events.js:187 throw er; // Unhandled 'error' event ^ PluginError [TypeError]: ...
Read more >
Class constructor cannot be invoked without 'new' in JS
The "Class constructor cannot be invoked without 'new'" error occurs for 2 reasons: Trying to instantiate a class without using the new operator....
Read more >
How to resolve 'class constructor cannot be invoked without ...
This needs to be compatible with IE11 while using ES6 syntax. I get. Class constructor I cannot be invoked without 'new'. The pertinent...
Read more >
TypeError: Class constructor HTMLElement cannot be invoked ...
TypeError : Class constructor HTMLElement cannot be invoked without 'new' · 1) Install custom elements es5 adapter for your project. npm i custom- ......
Read more >
mini-css-extract-plugin - npm
extracts CSS into separate files. Latest version: 2.7.2, last published: 21 days ago. Start using mini-css-extract-plugin in your project by ...
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