In my case, the issue was with the version of the ngx-permissions package.
I was using version 17.0.1 with an Angular v15 project, which caused the problem.
Downgrading ngx-permissions to version 15.0.1 fixed it. Additionally, I had to change the imports from ngxPermissionsGuard to NgxPermissionsGuard.