I can run my jekyll site locally with the jekyll serve command and it works perfectly fine, but when I try to deploy it to netlify I get the following error:
Conversion error: Jekyll::Converters::Scss encountered an error while
converting 'assets/main.scss':
File to import not found or unreadable: bootstrap/scss/bootstrap. Load
paths: /opt/build/repo/_sass /opt/build/repo/node_modules
/opt/build/repo/_sass on line 6
I tried to comment out importing bootstrap from within my main.scss which is in my assets folder but it is not isolated to just bootstrap, anything in the node_modules folder I can't import.
I have tried to change the import code from:
@import "bootstrap/scss/bootstrap";
To the following options:
@import "/node_modules/bootstrap/scss/bootstrap";
@import "../node_modules/bootstrap/scss/bootstrap";
But that hasn't worked
In my _config.yml I have the following configured:
sass:
load_paths:
- _sass
- node_modules
Thanks for taking a look and appreciate the help!
@import "bootstrap/scss/bootstrap";
is the right include. Did you versionnode_modules
? If not, did you version apackage.json
file ? – David Jacquel