I am creating a controller in nest js this is file auth.controller.ts
import { Controller } from 'nestjs/common';
@Controller()
export class AppController {}
Why I get this error? error TS2307: Cannot find module 'nestjs/common' or its corresponding type declarations.
I installed all dependencies, deleted the dist folder, and rerun yarn start:dev.
Here is all my dependencies.
The package is called @nestjs/common
, not nestjs/common
Then:
import { Controller } from '@nestjs/common';
tip: read the docs carefully https://docs.nestjs.com/controllers