postcss-css-variables icon indicating copy to clipboard operation
postcss-css-variables copied to clipboard

Maximum call stack exceeded

Open maciekpaprocki opened this issue 2 years ago • 2 comments

Seems like I am getting maximum call stack exceeded on postcss.

used plugins with tailwind

module.exports = {
    plugins: {
        'postcss-import': {},
        'tailwindcss/nesting': {},
        tailwindcss: {},
        autoprefixer: {},
        'postcss-sort-media-queries': {
            'sort': 'mobile-first'
        },

        'postcss-css-variables':{}
    },
}

error

RangeError: Maximum call stack size exceeded
    at Function.keys (<anonymous>)
    at shallowCloneNode (/Users/maciejpaprocki/Projects/bifl-nest/node_modules/postcss-css-variables/lib/shallow-clone-node.js:5:9)
    at /Users/maciejpaprocki/Projects/bifl-nest/node_modules/postcss-css-variables/lib/shallow-clone-node.js:36:13
    at Array.forEach (<anonymous>)
    at shallowCloneNode (/Users/maciejpaprocki/Projects/bifl-nest/node_modules/postcss-css-variables/lib/shallow-clone-node.js:5:19)
    at /Users/maciejpaprocki/Projects/bifl-nest/node_modules/postcss-css-variables/lib/shallow-clone-node.js:36:13
    at Array.forEach (<anonymous>)
    at shallowCloneNode (/Users/maciejpaprocki/Projects/bifl-nest/node_modules/postcss-css-variables/lib/shallow-clone-node.js:5:19)

maciekpaprocki avatar Apr 15 '23 12:04 maciekpaprocki

@maciekpaprocki Which version of postcss-css-variables are you using?

Can you reproduce if you remove those other plugins?

Can you provide a minimal example of the input right before it goes into the postcss-css-variables that causes the error?

MadLittleMods avatar Apr 17 '23 04:04 MadLittleMods

FWIW, I'm seeing this happen whenever any nesting plugin is before this one in the plugin chain (using tailwind/nesting)

searls avatar Mar 06 '24 17:03 searls