Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
Description and expected behavior
Reported an error:
Import trace for requested module:
./src/lib/hooks/session.ts
./src/lib/hooks/index.ts
./src/pages/index.tsx
wait - compiling /_error (client and server)...
error - ./node_modules/@zenstackhq/react/runtime/swr.js:36:0
Module not found: Can't resolve 'swr'
Did you mean './swr'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, /Users/xl/Work/emally/eSense/esense).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
https://nextjs.org/docs/messages/module-not-found
Should start without errors
Screenshots
N/A
Environment (please complete the following information):
ZenStack version: 1.0.0-alpha.98
Prisma version: 4.11.0
Database type: sqlite
Additional context
yarn add swr will resolve the issue
Thanks for reporting this! In the latest version @zenstackhq/react doesn't include dependency for swr anymore. I'll fix the doc to instruct users install it.
Description and expected behavior Reported an error:
Should start without errors
Screenshots N/A
Environment (please complete the following information):
Additional context yarn add swr will resolve the issue