nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.09k stars 541 forks source link

@nestjsx/crud@4.6.2 lacks dependency on @nestjs/swagger #543

Open arikon opened 4 years ago

arikon commented 4 years ago

So I'm getting this error trying to build app:

✗ npm run build

> @smart-oil/booster-api@0.0.0 prebuild /Users/arikon/projects/smart-oil/smart-oil-monorepo/packages/booster-api
> rimraf dist/

> @smart-oil/booster-api@0.0.0 build /Users/arikon/projects/smart-oil/smart-oil-monorepo/packages/booster-api
> nest build

../../common/temp/node_modules/.pnpm/@nestjsx/crud@4.6.2_b771dca686b3b059325add7ac728be05/node_modules/@nestjsx/crud/lib/interfaces/params-options.interface.d.ts:1:33 - error TS2307: Cannot find module '@nestjs/swagger/dist/types/swagger-enum.type' or its corresponding type declarations.

1 import { SwaggerEnumType } from '@nestjs/swagger/dist/types/swagger-enum.type';
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../common/temp/node_modules/.pnpm/@nestjsx/crud@4.6.2_b771dca686b3b059325add7ac728be05/node_modules/@nestjsx/crud/lib/interfaces/params-options.interface.d.ts:1:33 - error TS2307: Cannot find module '@nestjs/swagger/dist/types/swagger-enum.type' or its corresponding type declarations.

1 import { SwaggerEnumType } from '@nestjs/swagger/dist/types/swagger-enum.type';
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 error(s).
samissue commented 4 years ago

I have the same error with @nestjsx/crud@4.4.2

Temp. workaround for me was to add @nestjs/swagger": "4.4.0 to project dependencies.

prateekj117 commented 4 years ago

Faced the same error. Adding swagger to project dependency worked. Thanks @samissue .

thematan commented 3 years ago

But i don't want to add swagger dependecy!

0x7061 commented 3 years ago

I agree. It should be optional.