Support the ongoing development of Laravel.io →
Configuration Packages Testing

If I use this code in the gulpfile.js: var elixir = require('laravel-elixir');

/* |--------------------------------------------------------------------------

Elixir Asset Management
Elixir provides a clean, fluent API for defining some basic Gulp tasks
for your Laravel application. By default, we are compiling the Sass
file for our application, as well as publishing vendor resources.
*/

elixir(function(mix) { mix.sass(); });

It does not work but if I replace 'sass()' with 'sass(app.scss);', it works fine.

When using the 'gulp' command from the command line I get an error which says 'Cannot read property 'indexOf' of undefined'.

I've tried reinstalling the node JS from my project and still cannot get it to work.

Thanks

Last updated 2 years ago.
0

Hi Oliversb,

why are you trying to call mix.sass with no parameters?

By default, Elixir, underneath the hood, uses the LibSass library for compilation. If you think the problem is in the libraries you can try: npm rebuild node-sass

0

yurybs said:

Hi Oliversb,

why are you trying to call mix.sass with no parameters?

By default, Elixir, underneath the hood, uses the LibSass library for compilation. If you think the problem is in the libraries you can try: npm rebuild node-sass

Is there not a command to compile all SASS files? Thanks

0

Hi Oliversb,

yes, there is:

To compile Sass

elixir(function(mix) { mix.sass("app.scss"); });

This assumes that your Sass files are stored in resources/assets/sass.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

oliversb oliversb Joined 6 Nov 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.