managerial-maroonM
Refine2y ago
10 replies
managerial-maroon

Error: Can't resolve 'fs'

I am getting an error that states the following after attempting to use Casbin:
./node_modules/casbin/lib/esm/enforcer.js:442:0
Module not found: Can't resolve 'fs'


Here's my current dependencies:
"dependencies": {
    "@ant-design/icons": "^5.0.1",
    "@refinedev/antd": "^5.37.1",
    "@refinedev/cli": "^2.16.21",
    "@refinedev/core": "^4.46.1",
    "@refinedev/devtools": "^1.1.29",
    "@refinedev/inferencer": "^4.5.16",
    "@refinedev/kbar": "^1.3.5",
    "@refinedev/nextjs-router": "^5.5.5",
    "@refinedev/react-hook-form": "^4.8.13",
    "@refinedev/react-table": "^5.6.5",
    "@refinedev/simple-rest": "^5.0.1",
    "antd": "^5.0.5",
    "axios": "1.6.2",
    "casbin": "^5.28.0",
    "next": "^13.0.6",
    "nookies": "^2.5.2",
    "query-string": "7.1.1",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  },


Everything I've seen on other questions regarding the same problem point to changes that must be done to vite.config.ts but I'm not using that.
Was this page helpful?