Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@ucast/sql] error while install due to wrong typeorm version #38

Open
wolflu05 opened this issue Sep 11, 2022 · 0 comments
Open

[@ucast/sql] error while install due to wrong typeorm version #38

wolflu05 opened this issue Sep 11, 2022 · 0 comments

Comments

@wolflu05
Copy link

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/sql@1.0.0-alpha.1
npm ERR! Found: typeorm@0.3.7
npm ERR! node_modules/typeorm
npm ERR!   peer typeorm@"^0.3.0" from @nestjs/typeorm@9.0.0
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/sql@1.0.0-alpha.1
npm ERR! node_modules/@ucast/sql
npm ERR!   @ucast/sql@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: typeorm@0.2.45
npm ERR! node_modules/typeorm
npm ERR!   peerOptional typeorm@"^0.2.0" from @ucast/sql@1.0.0-alpha.1
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant