반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- next에러
- 대문자를소문자로
- typeorm
- RTX4070
- Connection not yet open
- nestjs
- DTO
- error: an invalid controller has been detected.
- react프로젝트생성
- monorepo
- 갤럭시북3울트라
- Can't resolve '@/styles/globals.css'
- NestJSSwagger
- 갤럭시북3
- 쿼리튜닝기법
- 네스트js
- 소문자를대문자로
- nestjs에러
- 4070
- 자바스크립트대소문자
- 리액트프로젝트생성
- API정의서
- monorepolib
- Entity
- next.js에러
- connectionerror
- Entity작성
- 네트스제이에스
- Delete `␍`eslintprettier/prettier
- 모노레포
Archives
- Today
- Total
코드 낭만 제작소
[NestJS Error] Error: An invalid controller has been detected. "SomeThing" does not have the @Controller() decorator but it is being listed in the "controllers" array of some module. 본문
Dev-Code(Back-End)/NestJS Error 모음
[NestJS Error] Error: An invalid controller has been detected. "SomeThing" does not have the @Controller() decorator but it is being listed in the "controllers" array of some module.
박개굴 2024. 10. 18. 09:59반응형
여느때와 같이 개발을 하던 중 에러를 발견했다.
기능의 한 부분을 만들고 서버를 실행시켜보니
제목과같은 에러가 뜨면서 서버에 문제가 생겼다.
굉장히 바보같은 실수고 나다운 실수다...
나 이외에는 이런 문제가 발생 하지 않을 지도 모르지만
이와 같은 문제로 시간을 빼앗기고 있을 분들을 위해 기록을 남겨본다.
@Module({
imports: [somethingModule],
controllers: [SomethingController],
providers: [SomethingService, SomethingRepository],
exports: [SomethingService],
})
우선 문제가 되는 기능의 모듈 파일을 가보자!
아마 위와같은 방식으로 -각자 조금씩은 다르겠지만- 코드가 작성되어 있을 것이다.
위의 오류는 controllers 부분에서 보면 되는데 controllers에 controller가 아닌걸 집어 넣어서 난 오류였다.
나의 경우는 자동으로 임포트를 시켰다가 확인도 안하고 넘기는바람에 Something의 스키마를 집어넣어놨다.
앞으로는 바보같이 이런 실수를 하지 말아야겠다 싶다.
우리 모두 철자, import확인을 꼭 합시다!
반응형
'Dev-Code(Back-End) > NestJS Error 모음' 카테고리의 다른 글
[NestJS Error] ConnectionError: Connection not yet open 에러(해결) (0) | 2023.03.08 |
---|---|
[NestJS Error] Cors 에러 발생(해결) (0) | 2023.02.07 |