0
votes

Ok. So this is my first lLaravel project. And I got into an odd issue. I am trying to customize the authentication forms by using bootstrap and my own added SASS files (which then are converted into the main app.css). So here is what is the issue: in the app.scss file I have imported the SASS partials and other external resources:

  1. // Fonts
  2. @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
  3. // Variables
  4. @import "variables";
  5. // Bootstrap
  6. @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
  7. // ADDED Login
  8. @import "login";

In this form, when the app.scss file is translated into the app.css, I receive an error "File to import not found or unreadable: node_modules/bootstrap-sass/assets/stylesheets/bootstrap. on line 6 of resources/assets/sass/app.scss". Anyone has any idea on how to fix this, suggestions on how to manage my css and sass files? Thank you in advance for your time.

2
Have you run npm install?Amit Gupta
No, I haven't. This should install the "node_modules" folder and everything in it?Stefan Paius
Yes, it will install the node_modules folder and everything in it?Amit Gupta
Tried that, but sadly still did not recognize the bootstrap file. Thank you, though.Stefan Paius

2 Answers

0
votes

I found a quick fix, but I am not sure that it is the best one. I downloaded a bootstrap.min.css and added it in public/css/ . Then, in the app.scss I imported the bootstrap file "@import "bootstrap.min.css";". That turned out to be a fix so far.

0
votes

Simply just add a ~ to beginning of the imported directory

@import "~node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

it should be like above.