node-casbin: Class extends value undefined is not a constructor or null
When importing casbin in a typescript project for Angular I get this error:

For the Model class I’ve solved by importing like this:
import { Model } from "casbin/lib/esm/model";
But for newEnforcer there is no way to work around that issue. Am I missing something?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (13 by maintainers)
Hello @giovanni-bertoncelli,
casbin.js@nexthas been released on NPM, you can useyarn add casbin.js@nextornpm install casbin.js@next --saveto add this to your project, how to use:Maybe this can be a valid alternative: https://www.papaparse.com/
@ghaiklor We are removing the dependency on
csv-parse.But we are still discussing on the implementation of some standards@giovanni-bertoncelli Once the new version is released, I will ping you.
@giovanni-bertoncelli Plz view casbin.js at
v1branch. casbin.js is under a totally refactor and will have the exactly funtion likenode-casbin, but platform independent.