Crud: @nestjsx/[email protected] lacks dependency on @nestjs/swagger

Created on 13 Jun 2020  Â·  3Comments  Â·  Source: nestjsx/crud

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

✗ npm run build

> @smart-oil/[email protected] prebuild /Users/arikon/projects/smart-oil/smart-oil-monorepo/packages/booster-api
> rimraf dist/


> @smart-oil/[email protected] build /Users/arikon/projects/smart-oil/smart-oil-monorepo/packages/booster-api
> nest build

../../common/temp/node_modules/.pnpm/@nestjsx/[email protected]_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/[email protected]_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).

Most helpful comment

I have the same error with @nestjsx/[email protected]

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

All 3 comments

I have the same error with @nestjsx/[email protected]

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

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

But i don't want to add swagger dependecy!

Was this page helpful?
0 / 5 - 0 ratings