Ember cli build stuck when using --environment=production?

Hi, I am new to Ember so please bear with me if this is obvious. We have built our Ember application and done deployment with ember build (default without options) successfully to dev testing environment without issue. Now I like to deploy the application to UAT then production, so I thought it is a good idea to use the production build which will minify everything if I understand correctly.

However the ember build --environment=production command or ember build -prod command always got stuck at building phase, I never receive the build is successful message. How can we see what is going on, and where it went wrong? I cannot see a option switch that output debug log etc. What should we do to resolve the issue?

happy case :

ember build version: 1.13.8 Building. Built project successfully. Stored in “dist/”.

not happy case:

ember build --environment=production version: 1.13.8 Building…

(never return and display the last build project successfully message)

We are using ember cli 1.13.8 and ember 2.1. We do have some deprecation warning when running the application.

Thanks

I eventually figure out that build process is not stuck, it is just taking a long time, because, it does not give any feedback, there is no way to tell. Our production build is more than 50 minutes, sometime a little more than 60 minutes. Just for ppl interested.

It will be nice if the build script could give some feedback. Still yet to figure out why minification take so long, since there is no feedback, I do not even know which file or library is taking so long.

Um. There’s definitely something very wrong here. My production builds take about 15-20 seconds on a moderate size app.

Would you mind posting your package.json and ember-cli-build.js files? Also ember --version would be great.

:anguished: 50minutes? do you run it on Windows? if so, use power shell and run it as administrator.

The non production build is very fast perhaps 15 seconds if that, but the production build take a long time. I can live with a 10 minutes build 60 minutes build is a bit too long.

Any way please find the ember-cli-build.js and package.json

Ember -v version: 1.13.13 node: 5.1.0 npm: 2.14.10 os: win32 x64

I have upgrade to the latest cli and ember 2.2.0

Ember Cli Build.js

/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
    var app = new EmberApp(defaults, {
        'ember-cli-bootswatch': {
            'theme': 'yeti'
            // 'excludeCSS': false,
            // 'excludeJS': false,
            // 'excludeFonts': false,
        },
        emberCliFontAwesome: {
            useScss: true
        }
        // Add options here
    });


    // Use `app.import` to add additional libraries to the generated
    // output files.
    //
    // If you need to use different assets in different
    // environments, specify an object as the first parameter. That
    // object's keys should be the environment name and the values
    // should be the asset to use in that environment.
    //
    // If the library that you are including contains AMD or ES6
    // modules that you would like to import into your application
    // please specify an object with the list of modules as keys
    // along with the exports of each module as its value.

    app.import(app.bowerDirectory + '/bootbox/bootbox.js');
    app.import(app.bowerDirectory + '/jquery-file-download/src/Scripts/jquery.fileDownload.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/css/froala_style.min.css');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/css/froala_editor.min.css');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/froala_editor.min.js');
    app.import(app.bowerDirectory + '/font-awesome/css/font-awesome.css');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/align.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/colors.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/css/plugins/colors.min.css');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/font_family.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/font_size.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/lists.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/inline_style.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/paragraph_format.min.js');
    app.import(app.bowerDirectory + '/FroalaWysiwygEditor/js/plugins/paragraph_style.min.js');
    return app.toTree();
};

Package.json

{  
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  
  "devDependencies": {
    "broccoli-asset-rev": "^2.2.0",
    "ember-browserify": "1.1.1",
    "ember-cli": "^1.13.13",
    "ember-cli-app-version": "1.0.0",
    "ember-cli-auto-register": "1.0.1",
    "ember-cli-autoprefixer": "0.5.0",
    "ember-cli-babel": "^5.1.5",
    "ember-cli-bootswatch": "0.2.0",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-datepicker": "2.0.1",
    "ember-cli-dependency-checker": "^1.1.0",
    "ember-cli-dropzonejs": "0.6.0",
    "ember-cli-font-awesome": "1.1.1",
    "ember-cli-htmlbars": "1.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-ic-ajax": "0.2.4",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-injection": "1.0.0",
    "ember-cli-moment-shim": "0.6.2",
    "ember-cli-qunit": "1.0.4",
    "ember-cli-release": "0.2.8",
    "ember-cli-sass": "5.0.1",
    "ember-cli-sri": "^1.2.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-cli-windows-addon": "^1.2.2",
    "ember-component-css": "0.1.6",
    "ember-disable-proxy-controllers": "^1.0.1",
    "ember-export-application-global": "^1.0.4",
    "ember-inputmask": "0.2.1",
    "ember-model-validator": "1.2.0",
    "ember-moment": "4.1.0",
    "ember-promise": "1.2.0",
    "ember-radio-button": "1.0.7",
    "ember-select-2": "1.3.0",
    "ember-simple-auth": "1.0.1",
    "ember-tether": "0.2.0",
    "ember-toastr": "^1.3.1",
    "ui-button": "0.6.3",
    "validate.js": "0.9.0"
  }
}

Thanks for your help

Yes, I am running build on Windows, Windows 2012 R2 to be more specific. I will try your suggestion and perhaps run the build on a mac and report back.

Thanks

I’m getting the same issue in Travis :dizzy_face:

Just an update, I have tried the build using administrator power shell same result about 60 minutes production build. and I have also tried on Mac and same result. I will not consider our application big. At most moderate size. I know there are something’s wrong just do not know enough to figure out what. The build eventually finish without error and the result distribution works as expected.

Just to note the build machine is reasonably powerful, The windows machine is a i7 (4790) with 32 gb memory with full SSD drives running Windows 2012 R2 The Mac I tried is a Mac Pro (late 2013 6 core) 16gb memory SSD running El Captain.

I’ve encountered same issue today, just couple of hours ago, not as slow as your case, but apparently slower than before.

the only difference I can find is I installed a 3rd party library: echarts - npm

I ask my workmates who didn’t update yet to try a build, they get a fast build, once they update as I have, build get slower as well.

I don’t think echarts is the problem, but there must be a pattern for our cases, just don’t know what it is.