Problem with webpack encore : error compilation less

293 Views Asked by At

I have a compilation problem with Bootstrap files (Webpack Encore) :

Error evaluating function percentage: argument must be a number Error in /app/assets/less/variables.less (line 302, column 26)

Code : @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);

The problem arise from reading parentheses with the division

If : @fluidGridColumnWidth: percentage((@gridColumnWidth/@gridRowWidth)); -> It works

I can't use this solution because the solution with vendors of Symfony :

@import "../../vendor/twbs/bootstrap/less/bootstrap.less";

I tried to use StrictMath true or 'division' -> doesn't work

    .enableLessLoader((options) => { return {lessOptions: { strictMath: true}}; })

Nota Bene : I have another project where I have the same code that works. So I fixed the versions to be identical to this project but it doesn't work either.

Thanks for your help

1

There are 1 best solutions below

0
On

Alternative :

Remove StrictMath -> solves the problem of parentheses

The problem with compil bootstrap file 4.3.1 on a background:url calculation :

Cannot read property 'denominator' of undefined

I used version 4.2.1 of the bootstrap file for these lines

DONE Compiled successfully