angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

(another) ng build --prod issue

Open m4mbart opened this issue 10 years ago • 8 comments

OS?

macOS Siera (but previosly tested with Capitain)

Versions.

angular-cli: 1.0.0-beta.16 nodejs: v6.4.0

Repro steps.

App generated with CLI. Nothing changed in app.module structue. Only third party libs added to package.json

The log given by the failure.

prod-error

ng serve works fine. ng build works fine too. This error only occurs with ng build --prod. Build process itself goes just fine. But when serving the output, one is presented with the stacktrace from the screenshot.

m4mbart avatar Sep 29 '16 12:09 m4mbart

That error is not related to the CLI, but rather part of Angular 2 itself. It usually comes up when migrating an app to RC5/6/final, and indicates that a component wasn't added to a NgModule.

filipesilva avatar Oct 05 '16 16:10 filipesilva

It started out as a RC6 project. So NgModules we're always there. I also have no issues or warnings during development. I am only using some external non Angular JS libs like Material Design Lite. Could it be caused by that and if so how can I solve it?

m4mbart avatar Oct 06 '16 06:10 m4mbart

If I break on the exception. 't' in this case is the window object.

m4mbart avatar Oct 06 '16 06:10 m4mbart

Hm... it might be related to third party libs then... Could you try to setup a repro repository in github? I can try to debug it.

filipesilva avatar Oct 09 '16 20:10 filipesilva

I am not so sure about that. It is already quite a large project and it would be time consuming to strip all sensitive stuff from the source. Can I send you a publicly accessible, but hidden, URL of the test environment in a private message? Any solutions can of course be discussed publicly in this thread

m4mbart avatar Oct 11 '16 09:10 m4mbart

@m4mbart Is this still an issue ?

catull avatar Feb 09 '17 17:02 catull

No I think it was a problem with some 'abstract' components I have been using. I removed those components and instead made the inheriting components composable. I will close this issue, thanks!

m4mbart avatar Feb 10 '17 08:02 m4mbart

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.