ucast
ucast copied to clipboard
[@ucast/sql] error while install due to wrong typeorm version
hello, I'm using @casl/ability to define my abilities. I find the idea of the @casl/prisma package really good, but I'm using typeorm. I found that @ucast/sql is able to translate the ability into a where clause which will be applied to a query builder. So I tried to install: @ucast/core and @ucast/sql and got the following error:
➜ ~/Development git:(main) ✗ npm i @ucast/core @ucast/sql
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ucast/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typeorm
npm ERR! peer typeorm@"^0.3.0" from @nestjs/[email protected]
npm ERR! node_modules/@nestjs/typeorm
npm ERR! @nestjs/typeorm@"^9.0.0" from the root project
npm ERR! typeorm@"0.3.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typeorm@"^0.2.0" from @ucast/[email protected]
npm ERR! node_modules/@ucast/sql
npm ERR! @ucast/sql@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/typeorm
npm ERR! peerOptional typeorm@"^0.2.0" from @ucast/[email protected]
npm ERR! node_modules/@ucast/sql
npm ERR! @ucast/sql@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/wolflu/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wolflu/.npm/_logs/2022-09-11T16_53_14_528Z-debug-0.log
So now my question is, is @ucast/sql still the way to go to translate into an sql query, or do I have to implement something my own via the rulesToQuery function from @casl/ability/extra?
Hope this project is not dead. Really cool project.
wolflu05