Crunch / postcss-less

MIT License
35 stars 9 forks source link

TypeError: postcss.root is not a constructor #19

Open SSinischo opened 1 year ago

SSinischo commented 1 year ago

Hello, I get the following message output to err executing the following test code: "TypeError: postcss.root is not a constructor"

'''

const less = require('postcss-less-engine');

var exampleLess = fs.readFileSync(path.join(__dirname, 'less/test.less'), 'utf8');

postcss([ less({ strictMath: true }), autoprefixer(), ]) .process(exampleLess, { parser: less.parser, from: 'less/test.less' }) .then(function (result) { console.log(result.css); }, function(err) {console.log("ERROR!!" + err)}); '''