Closed armr-dev closed 2 years ago
@Gabriel-403 @Zxilly @kingiw @nodece
@nodece
I've noticed the absence of the Authorizer export too when trying to upgrade from 0.4.0 to latest (in order to upgrade my project to use react-scripts@5.0.0). Without the Authorizer export I can't use the newer version with less missing polyfills, with the 0.4.0 one the project doesn't start at all.
@armr-dev @GhostyJade Casbin.js v1.x has been deprecated, please use latest v0.4.1 instead: https://github.com/casbin/casbin.js/releases/tag/v0.4.1
This solved the issue. Thank you!
So, I just updated my Casbin.js version from
0.4.0
to1.0.1
and I've run into the following error:It seems that the
Authorizer
class is not being exported anymore. I looked into the docs (here in Github and in the Casbin website), and both still cites theAuthorizer
on how to use the lib.Was the
Authorizer
removal by design or is this a bug?Steps to reproduce the error
0.4.0
;Try to import Authorizer, as noted in the docs:
or
Environment
I was able to reproduce this error in two different scenarios:
This error also persisted from the version
1.0.0-beta.1
, from what I tested.