I have used create-react-app and installed node-sass as a depandency. The react version is V16.13.1., and the node-sass version is V4.14.1. Both should be the latest version as then.
My question is if I use @debug $some-variable in my scss file, it doesn't show up in my terminal. However, what is interesting is when I kill the terminal and restart it again, it pops up for a fraction of second and disappear again. The same happens to @warn rule as well.
The workaround is to use @error instead, @error rule always intercepts the terminal and 100% pops up errors, I used it as a work around to debug my scss code.
But I believe the problem is on node-sass side, @debug/@warn should print out something, but just got overwritten on react scripts side, i.e. by "react-scripts start" script. In my opinion, there should be a way to block react side to do that, and persist the stdout info on the terminal. Maybe add a flag into node-sass or modify the start script on react side?
I hope I got the problem addressed properly. Does anyone has experience on this issue? Please advise.
Example code:
In foo.scss file:
@debug "hello world" // it does not print anything in terminal
@warn "this is a warning" // it does not print anything in terminal either
@error "it definately catch this" // the error shows up in terminal only