Developmint / nuxt-purgecss

Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
MIT License
478 stars 18 forks source link

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

Closed asennoussi closed 1 year ago

asennoussi commented 4 years ago

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?

urbgimtam commented 4 years ago

Having the exact same issue.

manniL commented 4 years ago

Which package version are you using?

asennoussi commented 4 years ago

2

manniL commented 4 years ago

Any changes to the purgecss module config?

asennoussi commented 4 years ago

I used exactly the config shown on the docs.

On Fri, May 15, 2020 at 3:40 PM Alexander Lichter notifications@github.com wrote:

Any changes to the purgecss module config?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Developmint/nuxt-purgecss/issues/89#issuecomment-629187702, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNKBZPC7NOM3ZWNMUOUID3RRUS2VANCNFSM4NBGFOBQ .

-- Sennoussi Aymane

manniL commented 4 years ago

Very weird. Tests are passing, so that shouldn't happen. Could you spin up a minimal example repo?

urbgimtam commented 4 years ago

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).

MUMUKSHMEGHWAL commented 4 years ago

@urbgimtam You might have not deleted your package-lock.json along with node_modules.

I ran into same issue and i deleted my node_modules multiple times but got same error but when i deleted node_modules and package-lock.json then it got resolved.

manniL commented 1 year ago

stale

padcom commented 1 year ago

Doesn't work :(

manniL commented 1 year ago

@padcom Please raise a new issue then with more info :)