ng2-stompjs
ng2-stompjs copied to clipboard
Not working in angular 15. Error: Failed to initialize Angular compilation - Failed to compile entry-point @stomp/ng2-stompjs
Hi, recently I have upgrade my ionic/angular project into angular version 15 from angular 14
In angular 14 working as Aspected. but after upgrading to angular 15 getting the error below Error: Failed to initialize Angular compilation - Failed to compile entry-point @stomp/ng2-stompjs
error NG2006: The injectable RxStompService inherits its constructor from RxStomp, but the latter does not have an Angular decorator of its own.
I think the error getting because of angular 15 changes in the Dependency Injection link attached below
https://angular.io/guide/update-to-version-15#invalid-constructors-for-dependency-injection-can-report-compilation-errors
The Angular compilation process has changed significantly in the past few releases. Because of that, it is no longer possible to maintain a single version of this library that works across all versions.
So, my recommendation will be to use rx-stomp directly. Please follow the guide at https://stomp-js.github.io/guide/rx-stomp/ng2-stompjs/ng2-stompjs-to-rx-stomp.html
In the very near future, this library will be deprecated in favor of rx-stomp.
Let me know if it helps.