Skip to content

ng build -prod fails #1047

Closed
Closed
@steveblue

Description

@steveblue

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OS X El Capitan 10.11.6 Beta (15G7b)

  1. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.

angular-cli: 1.0.0-beta.5
node: 5.5.0
os: darwin x64

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

I have added a few libraries to angular-cli-build.js and configured a broccoli tree to output global CSS but thats it. Even without the css tree, the problem exists. The TS doesn't get compiled for prod and my public folder doesn't get deployed. Everything works without the -prod flag. I also followed some advice seen in other posts here to no avail, nothing seems to make it work.

 let appTree = new Angular2App(defaults, {
      sourceDir: sourceDir,
      sassCompiler: {
        includePaths: [
          'src/style'
        ]
      },
      vendorNpmFiles: [
        'systemjs/dist/system-polyfills.js',
        'systemjs/dist/system.src.js',
        'es6-shim/es6-shim.js',
        'zone.js/dist/**/*.+(js|js.map)',
        'reflect-metadata/**/*.+(js|js.map)',
        'rxjs/**/*.+(js|js.map)',
        '@angular/**/*.+(js|js.map)',
        'd3/**/*.+(js|js.map)',
        'three/**/*.+(js|js.map)',
        'firebase/lib/*.+(js|ts|js.map)'
      ]
    });
  1. The log given by the failure. Normally this include a stack trace and some
    more information.

$ ng build -prod
⠼ Building"{{content-for}}" has been deprecated and will be removed before RC.
Built project successfully. Stored in "dist/".
File sizes:

  • app.component.css: 0 B
  • audio-player.component.css: 51 B (53 B gzipped)
  • button.component.css: 1.43 KB (575 B gzipped)
  • nav.component.css: 574 B (326 B gzipped)
  • slider.component.css: 2.01 KB (569 B gzipped)
  • toggle.component.css: 1.4 KB (544 B gzipped)
  • track-item.component.css: 517 B (274 B gzipped)
  • track-list.component.css: 241 B (169 B gzipped)
  • waveform.component.css: 165 B (143 B gzipped)
  • index.js: 69.26 KB (13.62 KB gzipped)
  • about.component.css: 111 B (109 B gzipped)
  • default.component.css: 180 B (151 B gzipped)
  • music-player.component.css: 60 B (76 B gzipped)
  • particle.component.css: 330 B (158 B gzipped)
  • remote-ui-demo.component.css: 773 B (330 B gzipped)
  • rtc-client.component.css: 216 B (172 B gzipped)
  • synth.component.css: 801 B (338 B gzipped)
  • ui-test.component.css: 1 KB (411 B gzipped)
  • main.js: 760.83 KB (158.95 KB gzipped)
  • _app.css: 2.13 KB (775 B gzipped)
  • style.css: 2.9 KB (1021 B gzipped)
  • _colors.css: 0 B
  • _fonts.css: 622 B (210 B gzipped)
  • _mixins.css: 164 B (148 B gzipped)
  • _normalize.css: 8.74 KB (2.96 KB gzipped)
  • _sprites.css: 0 B
  • _variables.css: 0 B
  • system-config.js: 1.82 KB (577 B gzipped)
  • es6-shim.js: 131.74 KB (30.4 KB gzipped)
  • Reflect.js: 36.91 KB (5.29 KB gzipped)
  • system.src.js: 159.57 KB (38.99 KB gzipped)
  • zone.js: 52.72 KB (11.37 KB gzipped)
  1. Mention any other details that might be useful.

The repo is here if you want to pull it down and inspect yourself.

https://github.com/steveblue/ng2-examples-cli

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions