creativetimofficial / ct-soft-ui-design-system-pro

Soft UI Design System PRO - Premium Bootstrap 5 UI kit
https://www.creative-tim.com/product/soft-ui-design-system-pro
16 stars 2 forks source link

[Bug] error on postCSS #27

Closed brunoamaral closed 2 years ago

brunoamaral commented 2 years ago

Version

1.0.8

Reproduction link

https://brunoamaral.eu It's a private repo, if you really need access to it, please let me know.

Operating System

Unix / MacOS

Device

n/a

Browser & Version

n/a

Steps to reproduce

I upgraded from version 1.0.x to 1.0.8 and now it fails to process using goHugo.io and PostCSS as a module.

Start building sites …
hugo v0.92.0+extended darwin/amd64 BuildDate=unknown
Error: Error building site: POSTCSS: failed to transform "scss/soft-design-system-pro.css" (text/css): TypeError: t.test is not a function
    at /Users/brunoamaral/Labs/odb/site/stdin:6:4
    at /Users/brunoamaral/Labs/odb/site/node_modules/purgecss/lib/purgecss.js:1:9044
    at Array.some (<anonymous>)
    at P.isSelectorSafelistedGreedy (/Users/brunoamaral/Labs/odb/site/node_modules/purgecss/lib/purgecss.js:1:9033)
    at /Users/brunoamaral/Labs/odb/site/node_modules/purgecss/lib/purgecss.js:1:10103
    at Array.some (<anonymous>)
    at P.shouldKeepSelector (/Users/brunoamaral/Labs/odb/site/node_modules/purgecss/lib/purgecss.js:1:10086)
    at /Users/brunoamaral/Labs/odb/site/node_modules/purgecss/lib/purgecss.js:1:7137
    at /Users/brunoamaral/Labs/odb/site/node_modules/postcss-selector-parser/dist/selectors/container.js:225:20
    at Root.each (/Users/brunoamaral/Labs/odb/site/node_modules/postcss-selector-parser/dist/selectors/container.js:207:16)
    at Root.walk (/Users/brunoamaral/Labs/odb/site/node_modules/postcss-selector-parser/dist/selectors/container.js:224:17) {
  postcssNode: Rule {
    raws: { before: '', between: '', semicolon: false, after: '' },
    type: 'rule',
    nodes: [
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration], [Declaration],
      [Declaration]
    ],
    parent: Root {
      raws: [Object],
      type: 'root',
      nodes: [Array],
      source: [Object],
      lastEach: 2,
      indexes: [Object],
      [Symbol(isClean)]: true,
      [Symbol(my)]: true
    },
    source: { start: [Object], input: [Input], end: [Object] },
    selector: ':root',
    lastEach: 2,
    indexes: {},
    [Symbol(isClean)]: true,
    [Symbol(my)]: true
  }
}

What is expected?

finish the build

What is actually happening?

an error that I can't understand where it's coming from. Even tried to downgrade my version of postCSS but didn't work.


Solution

Additional comments

brunoamaral commented 2 years ago

Trying to look for more information, I found out that there was an update to purgeCSS and changing the config resolved the problem.

https://giters.com/FullHuman/purgecss/issues/483#issuecomment-697207820