nestjsx / nestjs-typeorm-paginate

:page_with_curl: Pagination response object function + types for typeorm + nestjs
MIT License
840 stars 122 forks source link

FindOptionsWhere has no exported member #715

Open idemax opened 2 years ago

idemax commented 2 years ago

I'm trying to npm run tsc -- --project tsconfig.json but I'm facing this error:

node_modules/nestjs-typeorm-paginate/dist/paginate.d.ts:1:74 - error TS2305: Module '"typeorm"' has no exported member 'FindOptionsWhere'.

idemax commented 2 years ago

my tsconfig.json

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
idemax commented 2 years ago

@bashleigh found this change from 2 days ago who is basically upgrading the typeorm

https://github.com/nestjsx/nestjs-typeorm-paginate/commit/7d6faf0c098f18bff3a41dd894a8f81009541391

was this intended?

bashleigh commented 2 years ago

it was yes, v4.0.0 was to be used with typeorm ^0.3.6, just seen I've failed to remove the v0.2.* from the peer dep https://github.com/nestjsx/nestjs-typeorm-paginate/blob/master/package.json#L50 Which is why I released 4.0.0 because I didn't want to confuse people but looks like I have anyway

crazyoptimist commented 2 years ago

same issue here. with v4.0.1, typeorm ^0.2.41. rolling back to v3.2.1 worked for now.

bashleigh commented 2 years ago

@CrazyOptimist still the same with 4.0.1? It should've presented a warning as the peer dependancy doesn't match no?

crazyoptimist commented 2 years ago

I didn't remember whether it presented the warning msg or not. But apparently, build failed due to the type error. I think it's okay however, typeorm should be updated instead. we will stick to v3.2.1 until we'd update typeorm in the app.