ember-ckeditor icon indicating copy to clipboard operation
ember-ckeditor copied to clipboard

Production build hangs indefinitely

Open zeppelin opened this issue 10 years ago • 11 comments

$ ember -v
version: 0.2.7
node: 1.8.1
npm: 2.11.0

Repro steps:

$ ember new whatever
$ cd whatever
$ ember install ember-ckeditor
$ ember build -e production

The last command hangs with 100% CPU consumption.

zeppelin avatar Jun 22 '15 09:06 zeppelin

It will eventually finish (I've seen it take 20-30 mins), but this seems to be caused by the uglify stage + the plugins js files (I suspect the language files). We use a whitelist for including files which isn't a very good option for a generic addon.

ckAssets = new Funnel('bower_components/ckeditor', {
    srcDir: '/',
    include: [
        'ckeditor.js',
        'adapters/jquery.js',
        'styles.js',
        'config.js',
        'contents.css',
        'lang/en.js',
        'plugins/widget/plugin.js',
        'plugins/widget/lang/en.js',
        'plugins/autogrow/plugin.js',
        'plugins/**/*.png',
        'plugins/**/*.gif'],
    destDir: '/assets/ckeditor'
});

dustyjewett avatar Jun 23 '15 05:06 dustyjewett

@dustyjewett sorry to be a pain, what is your complete setup for doing it your way? I've done this but now I just get 'CKEDITOR is not defined', so clearly I have to attach it to the window somewhere, but not sure where.

jwhitmarsh avatar Jul 16 '15 15:07 jwhitmarsh

That's the base (we do more because we have our own plugins and skin).

Make sure you include the tree at the bottom of the brocfile:

module.exports = app.toTree([ckAssets]);

dustyjewett avatar Jul 16 '15 17:07 dustyjewett

I was bitten by this one today as well. I've used @dustyjewett's solution with slight modifications. Still takes a while though.

ChrisHonniball avatar Aug 27 '15 21:08 ChrisHonniball

Found it to be fingerprinting... Updated ember-cli-build.js to include:

  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      exclude: ['ckeditor'],
      ignore: ['ckeditor']
    }
  });

ChrisHonniball avatar Aug 27 '15 22:08 ChrisHonniball

Found it to be fingerprinting... Updated ember-cli-build.js to include:

  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      exclude: ['ckeditor'],
      ignore: ['ckeditor']
    }
  });

Using these settings allows for you to revert back to the included:

  treeForPublic: function(tree) {
    return new Funnel(this.project.bowerDirectory + '/ckeditor', {
      srcDir: '/',
      destDir: '/assets/ckeditor'
    });
  },

and build times are back to normal. The updates are in my fork with some additional alterations that I've made for my specific situation. You can check them out here and if you want them I can submit a pull request.

ChrisHonniball avatar Aug 28 '15 14:08 ChrisHonniball

+1 on this issue...Still having it too after trying the fixes... What can I do to solve this problem correctly? I need fast build times for production..

ghost avatar Sep 10 '15 18:09 ghost

+100 on this issue, took ages to see why my heroku build was failing

Leooo avatar Apr 22 '16 15:04 Leooo

Using:

  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      exclude: ['ckeditor'],
      ignore: ['ckeditor']
    }
  });

I'm currently running my fork of this repo and build times are normal.

ChrisHonniball avatar Apr 22 '16 15:04 ChrisHonniball

Yes @ChrisHonniball this solves the issue thanks.. if we think of looking at this thread.

Leooo avatar Apr 22 '16 15:04 Leooo

👍 I've added a comment about it to my repo however I've branched off quite a bit from this repo so I'm not sure if the updates will be needed/wanted in this repo.

ChrisHonniball avatar Apr 22 '16 15:04 ChrisHonniball