web-theme-bootstrap icon indicating copy to clipboard operation
web-theme-bootstrap copied to clipboard

Error: File to import not found or unreadable: ~bootstrap/scss/functions.

Open TomLewis opened this issue 4 years ago • 2 comments

Ahoy! From ~ I used tnpm i @mojang/web-theme-bootstrap --save which created a node_modules folder, when I try and compile with Koala, I get this error;

Error: File to import not found or unreadable: ~bootstrap/scss/functions.
       Load path: /Users/tom/Documents/www/public/projects/minecraftbook/node_modules/scss
        on line 1 of /Users/tom/node_modules/@mojang/web-theme-bootstrap/scss/styles.scss
        from line 6 of /Users/tom/Documents/www/public/projects/minecraftbook/node_modules/scss/main.scss
  Use --trace for backtrace.

It looks like all paths are hard coded to the ~ root users directory? Sorry this is my first time using SASS and first time trying to compile something from NPM, infant its the first time using NPM!

TomLewis avatar Nov 23 '20 12:11 TomLewis

@TomLewis did you ever figure it out? I'm having the same issue

Artuto avatar Feb 01 '21 22:02 Artuto

Hey there! I fixed it by downloading bootstrap 4.x (in my case 4.6) source (not prebuilt) and putting it in the scss folder. Then opening the style.scss file and mass replacing ~bootstrap/scss/ with ./bootstrap/scss/. Then just recompile and it should work as intended.

JoLoZ avatar Dec 05 '21 16:12 JoLoZ