SASS fails importing Bootstrap

You made an own skin or theme for phpMyFAQ. You can share it here with others!

Moderator: Thorsten

Post Reply
camille
Posts: 5
Joined: Thu Feb 25, 2021 4:24 pm

SASS fails importing Bootstrap

Post by camille » Thu Feb 25, 2021 4:28 pm

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.

camille
Posts: 5
Joined: Thu Feb 25, 2021 4:24 pm

Re: SASS fails importing Bootstrap

Post by camille » Fri Feb 26, 2021 9:56 am

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

Post Reply