crud icon indicating copy to clipboard operation
crud copied to clipboard

nestjs 10 removed misspelled CUSTOM_ROUTE_ARGS_METADATA

Open ckaeslin opened this issue 1 year ago • 4 comments

Bug Report

Due to https://github.com/nestjs/nest/commit/1a2ac3eeae7024c72a11f0a1b7b58036bb144764 @nestjsx/crud doesn't work with nestjs 10

Current behavior

TypeError: Cannot read properties of null (reading 'options') at @nestjsx/crud-typeorm/src/typeorm-crud.service.ts:122:18

Input Code

Expected behavior

Possible Solution

Also fix CUSTOM_ROUTE_AGRS_METADATA to CUSTOM_ROUTE_ARGS_METADATA, though this would break every application which uses nestjs < 9.0.6

Environment


Package version: 5.0.0-alpha.3
 
For Tooling issues:
- Node version: 18.6.0
- Platform:  Mac
- Database: Postgres

Others:

Repository with minimal reproduction

ckaeslin avatar Jun 21 '23 09:06 ckaeslin

same issue.

superiums avatar Jun 30 '23 11:06 superiums

I have the same error

nguyennhukhanh avatar Aug 24 '23 11:08 nguyennhukhanh

Is there any update on this issue. I also got the same error.

sandu9618 avatar Jan 26 '24 09:01 sandu9618

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:

@rewiko+crud+5.1.12.patch

danielsharvey avatar Mar 04 '24 06:03 danielsharvey