Reputation: 55
Working with Laravel 7 my resources->sass->app.scss is like the following:
@import "variables";
@import "node_modules/font-awesome/scss/font-awesome";
@import "node_modules/bulma/bulma";
@import "node_modules/buefy/src/scss/buefy";
However, Laravel mix returns a build error here like
ModuleBuild Error Module build faild (from./node module /saas-loader/dist/cjs.js);\rSaasError:cant find stylesheet to import.\r' @import "variables";
How can I fix this problem?
Upvotes: 1
Views: 358
Reputation:
If you don't have a _variables.scss
, then remove the reference. This is the right way to reference the /node_modules
directory.
// Fontawesome
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/regular';
@import '~@fortawesome/fontawesome-free/scss/solid';
@import '~@fortawesome/fontawesome-free/scss/brands';
// Bulma
@import '~bulma/bulma';
// Buefy
@import '~buefy/src/scss/buefy';
Upvotes: 1
Reputation: 337
Have you actually created the variables.scss file?
Laravel doesn't create this by default unless you run one of laravel/ui presets: bootstrap, vue, react
Upvotes: 1