-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build works, but ng build -prod doesn't #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Closed as issue was made obsolete by #1455. The build system changed drastically in that PR. |
@filipesilva $ng version $ng build No errors |
@meghadureja see #4264 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Ubuntu Linux 16.04 amd64
ng --version
. If there's nothing outputted, pleaseangular-cli: 1.0.0-beta.9
node: 6.2.2
os: linux x64
do on your code? etc.
Unfortunately, it's hard to tell: I switched to angular-cli in a middle of the project. I can build and run it without hte "-prod" flag, but it fails with the flag - see below.
more information.
$ ng build
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Built project successfully. Stored in "dist/".
$ ng build -prod
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Build failed.
The Broccoli Plugin: [BundlePlugin] failed with:
TypeError: Cannot read property 'forEach' of undefined
at Trace.getLoadDependencies (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/trace.js:879:12)
at traverseTree (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/arithmetic.js:360:16)
at /home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/compile.js:156:5
at Array.forEach (native)
at getTreeModulesPostOrder (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/compile.js:155:14)
at compileTree (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/compile.js:197:17)
at /home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/lib/builder.js:625:12
at tryCatcher (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:504:31)
at Promise._settlePromise (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:561:18)
at Promise._settlePromise0 (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/promise.js:685:18)
at Async._drainQueue (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/systemjs-builder/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues as _onImmediate
at tryOnImmediate (timers.js:543:15)
The broccoli plugin was instantiated at:
at BundlePlugin.Plugin (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/broccoli-plugin/index.js:10:31)
at BundlePlugin.CachingWriter as constructor
at BundlePlugin (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/lib/broccoli/angular-broccoli-bundle.js:11:5)
at Angular2App._getBundleTree (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/lib/broccoli/angular2-app.js:435:22)
at Angular2App._buildTree (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/lib/broccoli/angular2-app.js:167:21)
at new Angular2App (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/lib/broccoli/angular2-app.js:53:23)
at module.exports (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/angular-cli-build.js:10:10)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19)
at Class.module.exports.Task.extend.init (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10)
at new Class (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12)
at Class.module.exports.Task.extend.run (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/build.js:15:19)
at /home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/angular-cli/lib/commands/build.js:32:24
at lib$rsvp$$internal$$tryCatch (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at /home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/home/piontec/devfactory/git/aline-insights-copy/dizzard-ui/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
The text was updated successfully, but these errors were encountered: