Closed kevcjones-archived closed 3 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.
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 ofangular-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
It's good to hear its helped someone else, thanks 👍
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 ofangular-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
Failed to construct 'HTMLElement': Please use the 'new' operator
Cannot read property 'kind' of undefined at isAngularDecoratorMetadataExpression
originating from ngx-simple-modalWTF 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.
@angular-devkit/build-angular ^0.803.3
. After the clearing of modules we both hit the latest, and it didn't work.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 showingCannot read property 'kind' of undefined at isAngularDecoratorMetadataExpression
during the build stage.