6

I'm new to using LESS, and to Bootstrap, and I'm building a site for fun. When I run make in my bootstrap directory, if I screwed something up in my variables.less file I get a totally useless error message:

##################################################
Building Bootstrap...
##################################################

Running JSHint on javascript...             ✔ Done

/usr/local/lib/node_modules/less/lib/less/parser.js:385
                        throw new(LessError)(e, env);

[object Object]
make: *** [build] Error 1

How can I get some line numbers or something? It wasn't too bad to figure out what was going on in this case (I misused lighten(@color, 15%)) but if I start hacking the design quite a bit as desired I feel like I'm going to run in to trouble, being a LESS newb and all.

Any suggestions? Thanks.

merv
  • 67,214
  • 13
  • 180
  • 245
ZenLikeThat
  • 2,052
  • 3
  • 16
  • 23
  • 4
    Have you tried running *lessc* directly? It has a `--verbose` flag that might be helpful. I don't know if *recess* has an equivalent. – merv Aug 02 '12 at 03:28
  • There's an [outstanding issue about this on GitHub](https://github.com/twitter/recess/issues/73) which has a one-line fix* in the comments (*it replaces [object Object] with a more informative string, but it dumps a mini traceback) – Nick T Dec 23 '13 at 02:27

1 Answers1

3

I had exactly the same issues and I ran lessc directly (as merv suggested). I immediately had a context-sensitive error that I could deal with. Thanks, merv

Andrew Alcock
  • 19,401
  • 4
  • 42
  • 60