Open Banzerczhs opened 4 years ago
I ran this repository with the following example and got this error description
The following code just changes the file name
//js
var postcss=require('postcss'); var less = require('postcss-less-engine'); var autoprefixer = require('autoprefixer'); const fs=require('fs'); const path=require('path'); var exampleLess = fs.readFileSync(path.join(__dirname, './aaa.less'), 'utf8'); postcss([ less({ strictMath: true }), autoprefixer() ]) .process(exampleLess, { parser: less.parser, from: 'aaa.less' }) .then(function (result) { console.log(result.css); }, function(err) { console.log(err); });
//aaa.less
.app{ color: #fff; .le{ font-size: 24px; color: #3756; } }
I have the same question.
I got the same issue, but it works with less 2.7.x 🤷♂️
I ran this repository with the following example and got this error description
The following code just changes the file name
//js
//aaa.less