Page 1 of 1

SASS fails importing Bootstrap

Posted: Thu Feb 25, 2021 4:28 pm
by camille
Hi,

I'm trying to design my own theme. I'm quite new to scss and bootstrap.
When i try compiling scc file to css (node-sass assets/themes/mytheme/scss/styles.scss -o assets/dist/), i have the following message :

Code: Select all

{
  "status": 1,
  "file": "/var/www/html/phpmyfaq/assets/themes/mytheme/scss/styles.scss",
  "line": 20,
  "column": 1,
  "message": "File to import not found or unreadable: ~bootstrap.",
  "formatted": "Error: File to import not found or unreadable: ~bootstrap.\n        on line 20 of assets/themes/mytheme/scss/styles.scss\n>> @import '~bootstrap';\n\n   ^\n"
}
I have installed Boostrap following the documentation (with npm). What am i missing ?

Thanks.

Re: SASS fails importing Bootstrap

Posted: Fri Feb 26, 2021 9:56 am
by camille
I finally solved my problem, by modifying the following in style.scss :

Code: Select all

@import 'node_modules/bootstrap/scss/bootstrap';
@import 'node_modules/fork-awesome/scss/fork-awesome'; //I had the same problem with the importation of fork-awesome