Question

I created my own brunch configuration to work with coffeescript, jade and stylus.

It works perfectly, except for one major issue. Whenever coffeescript or jade (not had a stylus coding error yet) have issues compiling during brunch --watch, I get an error like the following :

C:\path\to\node_modules\brunch\lib\fs_utils\pipeline.js:64
          return callback(throwError('Compiling', error));
                 ^
ReferenceError: callback is not defined
    at C:\path\to\node_modules\brunch\lib\fs_utils\pipeline.js:64:18
    at CoffeeScriptCompiler.module.exports.CoffeeScriptCompiler.compile (C:\path\to\node_modules\coffee-script-brunch\lib\index.js:56:16)
    at C:\path\to\node_modules\brunch\lib\fs_utils\pipeline.js:93:31
    at fn (C:\path\to\node_modules\brunch\node_modules\async-waterfall\index.js:19:24)
    at Object._onImmediate (C:\path\to\chromesign\node_modules\brunch\node_modules\async-waterfall\index.js:58:22)
    at processImmediate [as _immediateCallback] (timers.js:330:15)

It looks like the plugin should be passed an error call back, but it isn't happening?

Have I done something wrong in my configuration? The skeleton with all the config is hosted on GitHub. I'd appreciate some input as to whether this is a problem on my side!

Thanks!

Was it helpful?

Solution

It appears that you installed brunch from the git master branch when you generated this error. I was unable to reproduce it using v1.7.10. On master (where I was able to reproduce it), it's just been fixed with https://github.com/brunch/brunch/commit/68dd9c9b6284c05a4eb01050dba56f80f978e35a. So if you reinstall brunch now, either the latest release (1.7.10) or the edge version from git master, the problem you've reported should go away.

Additionally, you might want to reconsider making brunch a dependency of your skeleton in the package.json. Unless there's a specific reason otherwise, it's better to let it just be installed globally. If you want to clarify to users that your skeleton should only be used with brunch versions >=1.7, you can say so in your readme.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top