wallabyjs / atom-wallaby

Wallaby.js atom package starter
Other
57 stars 6 forks source link

Missing `babel-core` npm package in project results in misleading error message #36

Closed gregorskii closed 8 years ago

gregorskii commented 8 years ago

Hi there,

When the the Babel compiler is used and one has not installed babel-core to their local project the error message produced is not correct:

Failed to run compilers on src/boardTemplate.js, Error: Processor(s) for "**/*.js" is specified incorrectly, must be an array of functions or a function.
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickCallback (internal/process/next_tick.js:98:9)
  at emitTwo (events.js:100:13)
  at process.emit (events.js:185:7)
  at handleMessage (internal/child_process.js:718:10)
  at Pipe.channel.onread (internal/child_process.js:444:11)

Updated It was showing coffeescript as the file in error, I commented out .coffee in the config and it moved on to a JS file. Just wanted to clarify that was not the issue. I am working on the Pluralsight video about Wallaby and he walked the user through TS/Coffee and now ES6, typically I would not use either of those two together.

However in the Atom console the actual error is shown:

screenshot 2016-04-20 16 06 41

Configuration used:

module.exports = function(wallaby) {
    return {

        debug: true,

        files: [
            { 'pattern': 'node_modules/chai/chai.js', 'instrument': false },
            { 'pattern': 'node_modules/sinon/pkg/sinon.js', 'instrument': false },
            { 'pattern': 'node_modules/jquery/dist/jquery.js', 'instrument': false },
            'src/**/*.js',
            'test/helpers/page.js',
            'test/helpers/utility.js'
        ],

        tests: [
            'test/*-spec.js',
            'test/*-spec.coffee',
            'test/*-spec.ts'
        ],

        testFramework: 'mocha',

        compilers: {
            '**/*.js': wallaby.compilers.babel()
        }
    }
};

Thanks!

ArtemGovorov commented 8 years ago

Thanks for the report. The issue is fixed the latest wallaby core v1.0.217. The core should be updated automatically within a few minutes after next wallaby (re)start in Atom (you may also force the update in Atom if you prefer to get the update ASAP).