fb55/css-select

Cannot read property 'Descendant' of undefined when update to webpack 5.71.0

Closed this issue ยท 5 comments

When updating to webpack 5.71.0, then I'm having this issue:

[webpack-cli] TypeError: Cannot read property 'Descendant' of undefined
at Object. (/home/vsts/work/1/s/node_modules/css-select/lib/compile.js:36:56)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object. (/home/vsts/work/1/s/node_modules/css-select/lib/index.js:29:17)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)

Sorry for confusion, solved, it was related to a different update

@jquintozamora what update was this related to? I started getting this error today in my Strapi setup :(

I was getting this same error. It was because I had an old version of css-what in my resolutions. Bumping to css-what 6.1.0 fixed it.

Same here. It was because i was trying to fix an issue with enzyme by pinning a version of cheerio in my package.json enzymejs/enzyme#2518 (comment)

So currently my fix is (this is for the enzyme issue using yarn):

  "resolutions": {
    "cheerio": "1.0.0-rc.10",
    "css-what": "^6.0.1"
  }

Thanks Michael. I was unable to fix this error for quite some time but your solution worked like a charm. I was using "5.0.1" and bumping it to "6.1.0" fixed it.