kevcjones / ngx-simple-modal

A simple unopinionated framework to implement simple modal based behaviour in angular (v2+) projects.
MIT License
52 stars 27 forks source link

@angular-devkit/build-angular 0.803.3 #63

Closed kevcjones-archived closed 3 years ago

kevcjones-archived commented 5 years ago

This is an edge case we found with the latest build and wanted this to be up for anyone in the meantime.

@angular-devkit/build-angular 0.803.3 is not compatible with the newer ng-packagr outputted dist. The latest version of angular-devkit/build-angular would break our @angular-elements.

The fix was to update to at least 0.803.8.

Set the scene

This is edge-case stuff, so don't expect you to have this problem

WTF i said...

Of course, this inconsistency was different npm_modules... i really don't like that ^.

After a lot of NPM tweaking and looking over things that had changed recently + cross-searching for bugs, chasing red herrings we isolated the cause of our problems down to two things.

  1. We'd been doing some work for about 2-3 weeks on locally cached versions of @angular-devkit/build-angular ^0.803.3. After the clearing of modules we both hit the latest, and it didn't work.
  2. We'd recently updated our ngx-simple-modal to use ng-packagr which we discovered didn't play well with our base version of 0.803.3.

Now to try and find out if this is a problem the tooling team would care about? It is pretty edge case after all.

It wasn't until we tried to go from a pre-release angular-element to a new version and build that we found it.

The fix in the end - find the sweet spot

We could only go as far as @angular-devkit/build-angular 0.803.8 before the output changed and our angular-elements stopped working. Luckily at this version, the latest packagr changes didn't break either with ngx-simple-modal showing Cannot read property 'kind' of undefined at isAngularDecoratorMetadataExpression during the build stage.

kevcjones-archived commented 5 years ago

@alan-agius4 just an FYI - if you hear about something similar to this during the tooling updates, it would be good to know. For our edge case, this is only a problem until we remove the need to use angular elements.

Fully accept our implementation of angular-elements might also have a lot to do with this too.

whtan98 commented 5 years ago

This is an edge case we found with the latest build and wanted this to be up for anyone in the meantime.

@angular-devkit/build-angular 0.803.3 is not compatible with the newer ng-packagr outputted dist. The latest version of angular-devkit/build-angular would break our @angular-elements.

The fix was to update to at least 0.803.8.

I got the same issue during "ng build --prod".
Many thanks for sharing the fix

kevcjones-archived commented 4 years ago

It's good to hear its helped someone else, thanks 👍