Following the update to the latest stable version of the library ngx-masonry
14.0.0, our tests started failing. The release was just yesterday (24.10.2022) and you can find the changelog here: https://github.com/wynfred/ngx-masonry/blob/master/CHANGELOG.md
The major change they made was transitioning to Ivy build from ViewEngine in older versions. It seems like this error is related to the migration to the newer Angular compiler, as we are using Angular version 14 in our project.
After successfully updating with
npm i <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6b050c1346060a18040519122b5a5f455b"></a>
, there were no vulnerabilities detected.
To test it out, I ran ng test
on my Angular application to ensure everything was functioning properly. The failing test was a basic one that checks if the component is being created. Several components that rely on the ngx-masonry
library threw the following error: ReferenceError: require is not defined
https://i.sstatic.net/bgnqU.png
https://i.sstatic.net/PQZTw.png
Since this issue is still fresh (<24hrs old), more developers might encounter it when upgrading to version 14.
You can track the ongoing issue on their GitHub repository here: https://github.com/wynfred/ngx-masonry/issues/98
We may be overlooking something or perhaps there is an easy solution to this. :)