Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

SCSS errors are not reported #504

Closed
ghost opened this issue Feb 4, 2015 · 10 comments
Closed

SCSS errors are not reported #504

ghost opened this issue Feb 4, 2015 · 10 comments

Comments

@ghost
Copy link

ghost commented Feb 4, 2015

When there's a syntax error in any SCSS file, grunt does not report it if the server is already running and a recompile is attempted.

@eddiemonge
Copy link
Member

Are you sure? What does your output show? Ruby or libasass?

@scerelli
Copy link

me too, i've the same problem. I'm going to replace grunt-sass with grunt-contrib-sass to check if i can solve the problem.

Debugging sass.js i saw that during compiling it doesn't even join inside error if an error exist.

error: function (error)
 {
          console.log(error, 'I never join there');
          grunt.warn(error);

          next(error);
}

edit: not only scss sass too.
edit2: error aren't reported even on server startup the only difference is that during startup if any error is found it stop and return a warning without any detail about where the error is if is running nothing happen.

@ghost
Copy link
Author

ghost commented Feb 15, 2015

I've had this too. The first time it happen it was very frustrating the first time it happen so definitely needs fixing.

@scerelli
Copy link

update3: the sass.js seems to use node-sass to check errors, that definitely seems to work well, at least in my case.

node-sass app/styles/main.sass .tmp/styles/main.css

@mahmoudilyan
Copy link

Its not working for me, everything works smoothly except error logs from sass. So annoying and its always waste time on finding the bugs

@arthurvr
Copy link
Member

arthurvr commented May 3, 2015

I'm unable to reproduce this using both master and the latest version. Can you make sure you're on the latest generator-webapp and retry? Updating is possible using:

$ npm install --global generator-webapp

If that doesn't fix the issue please include the OS you're on, the Node version you're running on.

Debugging sass.js i saw that during compiling it doesn't even join inside error if an error exist.

There is no sass.js file, I guess you mean the Gruntfile?

@HughxDev
Copy link

I'm also having this issue, but regardless of whether the server is already running or not. Tested on Windows 7 Ultimate and CentOS 6.5 (both 64-bit). Each time I ran yo webapp selecting Bootstrap, Sass, and Modernizr, and choosing y for libsass. If my SCSS is correct, grunt and grunt serve run flawlessly. If I have a syntax error in my SCSS, then I get this:

Running "concurrent:server" (concurrent) task
    Warning: Running "sass:server" (sass) task Use --force to continue.

        Aborted due to warnings.


Execution Time (2015-05-23 20:05:24 UTC)
loading tasks         2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 43%
wiredep:app        236ms  ▇▇▇ 5%
concurrent:server   2.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 51%
Total 4.5s

It doesn't specify that there was a syntax error at all. It just warns that it's running the sass:server task... which it's supposed to. This cost me a HUGE amount of development time to troubleshoot.

@HughxDev
Copy link

Note: force-updating all dependency definitions using this process fixed the issue for me

@arthurvr
Copy link
Member

Note: force-updating all dependency definitions using this process fixed the issue for me

Thanks for letting us know. That would mean the bug was somewhere upstream. We've updated all our dependencies but that wasn't in the last release yet.

@silvenon
Copy link
Member

The latest release, v0.6.0, properly outputs errors and successfully continues watching after it encounters one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants