sglanzer-deprecated/ember-cli-blanket

Blanket may break ember-cli live reload ?

Opened this issue · 0 comments

Hi there,

Ever since I added ember-cli-blanket to my app the live reload is broken, it will always fails with:

ENOENT, no such file or directory '/path/to/my/app/tmp/broccoli_merge_trees-output_path-N3fI6EO1.tmp/tests'
Error: ENOENT, no such file or directory '/path/to/my/app/tmp/broccoli_merge_trees-output_path-N3fI6EO1.tmp/tests'
    at Error (native)
    at Object.fs.statSync (fs.js:797:18)
    at copyDereferenceSync (/path/to/my/app/node_modules/ember-cli/node_modules/ember-cli-copy-dereference/index.js:13:21)
    at Function.copyDereferenceSync (/path/to/my/app/node_modules/ember-cli/node_modules/ember-cli-copy-dereference/index.js:31:7)
    at /path/to/my/app/node_modules/ember-cli/lib/models/builder.js:103:19
    at lib$rsvp$$internal$$initializePromise (/path/to/my/app/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
    at PromiseExt.lib$rsvp$promise$$Promise [as _superConstructor] (/path/to/my/app/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
    at new PromiseExt (/path/to/my/app/node_modules/ember-cli/lib/ext/promise.js:32:8)
    at Class.module.exports.Task.extend.copyToOutputPath (/path/to/my/app/node_modules/ember-cli/lib/models/builder.js:98:12)
    at /path/to/my/app/node_modules/ember-cli/lib/models/builder.js:112:21

I can't tell if it's a bug, an incompatibility with another addon or if it's a configuration issue but it's only the live reload that fails:

  • the app starts fine
  • the tests runs fine
  • I do have the code coverage

And it is ALWAYS the "tests" directory, if I sets "tests: false" in ember-cli-build.js I won't have any error.

The directory which is not found is an alias to a directory such as tmp/custom_replace-tmp_dest_dir-5n7LuzAV.tmp/tests.

My blanket-options.js is the following:

/* globals blanket, module */

const options = {
  modulePrefix: 'APP_NAME',
  filter: '//.*APP_NAME/.*/',
  antifilter: '//.*(tests|template).*/',
  loaderExclusions: [],
  enableCoverage: true,
  cliOptions: {
    reporters: [
      'lcov'
    ],
    autostart: true,
    lcovOptions: {
      outputFile: 'lcov.info',

      // automatically skip missing files, relative to project's root dir
      excludeMissingFiles: true,

      // provide a function to rename es6 modules to a file path
      renamer: function(moduleName){
        // return a falsy value to skip given module
        if (moduleName === 'unwanted') { return; }

        var expression = /^APP_NAME/;
        return moduleName.replace(expression, 'app') + '.js';
      }
    }
  }
};

if (typeof exports === 'undefined') {
  blanket.options(options);
} else {
  module.exports = options;
}

Any pointer would be appreciated as I'm not sure where to look at.