question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use only SASS

See original GitHub issue

For example, if I want to use only sass mix it will fail:

mix.sass('resources/assets/sass/app.scss', 'public/css/app.css')

Error:

./node_modules/laravel-mix/src/Mix.js:70
        let entry = this.js.reduce((result, paths) => {
                           ^

TypeError: Cannot read property 'reduce' of undefined

If js mix is included , when everything is OK:

mix.js('resources/assets/js/app.js', 'public/js/test.js')
    .sass('resources/assets/sass/app.scss', 'public/css/app.css')

It looks like you must always include js mix

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
JeffreyWaycommented, Jan 26, 2017

Update: I’ve pushed a new version that will allow you to do mix.sass() without ever calling mix.js(). It’ll just create the entry for you.

3reactions
taylorotwellcommented, Jan 26, 2017

Yeah we might want a better error or documentation about it. Have been getting messages on Twitter about this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sass: @use
Members (variables, functions, and mixins) loaded with @use are only visible in the stylesheet that loads them. Other stylesheets will need to write...
Read more >
I can't use @use in sass file in Create React App + node-sass ...
I want to use this variable in my src/components/LandingPage/LandingPage.module.scss file. Inside this file, I have: @use "../../styles/ ...
Read more >
Can't use only SASS · Issue #39 · laravel-mix/laravel-mix
For example, if I want to use only sass mix it will fail: mix.sass('resources/assets/sass/app.scss', 'public/css/app.css') Error: .
Read more >
How to Use Sass with CSS - freeCodeCamp
If you come back soon to continue working, all you have to do is open the file which has the extension .scss. Then...
Read more >
Stop using @import with Sass | @use and @forward explained
Your browser can't play this video. Learn more. Switch camera.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found