That's the thing - the code comes from Bootstrap's scss files and it's impossible to find where the error comes from because those values are compiled from variables, i.e. calc(#{$value1} - #{$value2}), #{$value1} - #{$value2})
Error in Bootstrap files when compiling assets.
I was running npm run watch which was working fine until it got stuck on 16% when compiling. I googled it and found that running npm run prod shows the error that doesn't let it compile. When I ran npm run prod I got this:
Lexical error on line 1: Unrecognized text.
Erroneous area:
1: 1.5em + 0.75rem2px
^.....................^
I commented everything out - all my styles, vue components and js, and I still get the error.
The only thing that works - commenting out @import '~bootstrap/scss/bootstrap'; from app.scss.
I also tried updating Bootstrap from v4.0 to v4.4 and deleting node_modules folder with package-lock.json and running npm install- got no errors there. But then running npm run prod gives the same error.
Anyone have any experience with this? I've been stuck on this for hours.
@memele I could reproduce the issue. Indeed as you said, it is an issue with bootstrap and precisely in the version 4.4.0. I fixed it by installing 4.3.1:
npm install [email protected] --save-dev
Assuming bootstrap is also a dev dependency in your case.
Then: npm run prod would properly work.
Please or to participate in this conversation.