Closed neutron92 closed 1 year ago
@neutron92 , how did you fix this issue ?
I'm struggling with updating nestjs to v10 in existing project and hit the wall with this repo not being maintained anymore. There is a fork that looks well maintained here: https://github.com/gid-oss/dataui-nestjs-crud
i face same issue, please reopen this issue
Same here Do you have any news to bypass this issue ?
I'm struggling with updating nestjs to v10 in existing project and hit the wall with this repo not being maintained anymore. There is a fork that looks well maintained here: https://github.com/gid-oss/dataui-nestjs-crud
I'm struggling with updating nestjs to v10 in existing project and hit the wall with this repo not being maintained anymore. There is a fork that looks well maintained here: https://github.com/gid-oss/dataui-nestjs-crud
saved my project bud ! Thx
Overriding the base route fixes the issue!.. but I mean this is not a proper fix.. since I believe we're are not supposed to override unless there's a reason. The latest update I think breaks the chain where @Controller
extends the class.
The underlying cause is https://github.com/nestjsx/crud/issues/825. My workaround (from here):
If you are using @rewiko/crud, use patch-package to handle the NestJS change.
For context, this is the issue: https://github.com/nestjs/nest/pull/11450 (a constant
CUSTOM_ROUTE_AGRS_METADATA
was misspelt a while back and finally removed - the correct spelling is now used -CUSTOM_ROUTE_ARGS_METADATA
).Here is my patch:
Same issue here also:
ERROR [ExceptionsHandler] Cannot destructure property 'parsed' of 'req' as it is null.
TypeError: Cannot destructure property 'parsed' of 'req' as it is null.
at ScanMetadataService.getMany (/node_modules/@nestjsx/crud-typeorm/src/typeorm-crud.service.ts:99:13)
at ScanMetadataController.getManyBase (/node_modules/@nestjsx/crud/src/crud/crud-routes.factory.ts:215:27)
at /node_modules/@nestjs/core/router/router-execution-context.js:38:29
at processTicksAndRejections (node:internal/process/task_queues:95:5)
I downgraded from nestjs 10.3.3 to 9.4.3 @nestjs/core@9.4.3 @nestjs/common@9.4.3
and it worked.
Or of course, use a more maintained crud library as mentioned above:
npm uninstall @nestjsx/crud @nestjsx/crud-typeorm
npm i --save @dataui/crud @dataui/crud-typeorm
And change all imports from '@nestjsx/crud'
and from '@nestjsx/crud-typeorm'
to '@dataui/crud'
and '@dataui/crud-typeorm'
respectively.
Bug Report
Current behavior
when i open http://localhost:3333/users in my browser to get list of users i have 500 and the error in the console
in the POST
The req argument all the time is null
Input Code
Expected behavior
it works
Possible Solution
Environment
Repository with minimal reproduction