[Node.js][Nest.js] ERROR [ExceptionHandler] No metadata for "{EntityName}" was found.

2022. 4. 10. 02:09ใ†๊ฐœ๋… ์ •๋ฆฌ ์ž‘์—…์‹ค/๋ฌธ์ œ ์ •๋ฆฌ

728x90
๋ฐ˜์‘ํ˜•

 

๐Ÿ‘ท‍โ™‚๏ธ ์ž‘์—… ์ค‘์ธ ๋‚ด์šฉ

์ฃผ๋‹ˆํ•˜๋ž‘์€ `Nest.js`๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ฒŒ์‹œํŒ ๊ตฌํ˜„์„ ์œ„ํ•ด ์ดˆ๊ธฐ ๊ตฌ์„ฑ ์ž‘์—…์œผ๋กœ `Controller`, `Entity`, `Module`, `Repository`, `Servcie` ๋“ฑ์„ ๋‹ค ๋งŒ๋“ค๊ณ , Server๋ฅผ ๊ตฌ๋™ํ•ด ๋ณธ ๊ฒƒ์ด์—์š”.

 

 

์ž‘์—… ๋‚ด์šฉ ๋ณด๊ธฐ 

 

[BackEnd][Node.js][nest.js-PJ] ์‚ฌ๋‚ด ๊ฐœ๋ฐœ์ž ์ปค๋ฎค๋‹ˆํ‹ฐ ์„œ๋น„์Šค - ๊ฒŒ์‹œํŒ ๋งŒ๋“ค๊ธฐ : ์ดˆ๊ธฐ ๊ตฌ์„ฑ(Entity, Controller,

Project Git Hub ๐Ÿ—‚ ๋ชฉ์ฐจ โ— [BackEnd][Node.js][nest.js-PJ] ์‚ฌ๋‚ด ๊ฐœ๋ฐœ์ž ์ปค๋ฎค๋‹ˆํ‹ฐ ์„œ๋น„์Šค - ์ดˆ๊ธฐ ๊ตฌ์„ฑ(Pipe, TypeORM, Configuration, Swagger, Logger) โ— [BackEnd][Node.js][nest.js-PJ] ์‚ฌ๋‚ด ๊ฐœ๋ฐœ์ž ์ปค..

junyharang.tistory.com

 

 

 

โš ๏ธ ๋ฌธ์ œ ๋ฐœ์ƒ!

 

 

 

 

 

๐Ÿค” ์›์ธ ๋ถ„์„

์ด ๋ฌธ์ œ๋Š” Java์—์„œ๋Š” `Annotation`์ด๋ผ๊ณ  ๋ถˆ๋ฆฌ๋Š” `Decorator`๋ฅผ ๋นผ ๋จน์–ด์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ์ธ ๊ฒƒ์ด์—์š”.

 

dev-inquery.entity.ts

๋ฐ”๋กœ ์—ฌ๊ธฐ `Entity` Class์— ํ•„์ˆ˜ Decorator์ธ `@Entity()`๊ฐ€ ๋น ์ ธ์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ์ธ ๊ฒƒ์ด์—์š”.

 

 

 

 

๐Ÿป ๋ฌธ์ œ ํ•ด๊ฒฐ!

dev-inquery.entity.ts

๋ฐ˜์‘ํ˜•

17๋ฒˆ์งธ ์ค„์— `@Entity()`๋ฅผ ์„ ์–ธํ•˜๊ณ , ๋‹ค์‹œ ์žฌ ๊ธฐ๋™ ํ•ด ๋ณด์•˜์–ด์š”.

 

 

 

์งœ์ž”! ๐Ÿ˜ƒ

์ •์ƒ ๊ตฌ๋™์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

 

 

 

 

 

 

 

728x90
๋ฐ˜์‘ํ˜•