inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

176만명의 커뮤니티!! 함께 토론해봐요.

N:M 등록 / 조회 API

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

query{ fetchProduct(productId:"7967c808-532f-48e8-87b7-4f4536ab1903"){ id name description price isSoldout productSaleslocation{ id address addressDetail lat lng meetingTime } productCategory{ id name } productTags{ id name } } } { "errors": [ { "message": "Cannot return null for non-nullable field Query.fetchProduct.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "fetchProduct" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "exception": { "stacktrace": [ "Error: Cannot return null for non-nullable field Query.fetchProduct.", " at completeValue (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\graphql\\execution\\execute.js:594:13)", " at C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\graphql\\execution\\execute.js:486:9", " at processTicksAndRejections (node:internal/process/task_queues:96:5)", " at async Promise.all (index 0)", " at execute (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\requestPipeline.ts:501:14)", " at processGraphQLRequest (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\requestPipeline.ts:407:22)", " at processHTTPRequest (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\runHttpQuery.ts:436:24)" ] } } } ], "data": null } 똑같이 따라헀는데, fetchproduct 부분에서 왜 이런 오류가 발생하는 것일까요? product.entity.ts 를 아래와 같이 nullable: true로 수정했는데도 플레이 그라운드에서 똑같은 에러가 나옵니다. ======================== import { Field, Int, ObjectType } from '@nestjs/graphql'; /* eslint-disable prettier/prettier */ // product.entity.ts import { ProductCategory } from 'src/apis/productCategory/entities/productCategory.entity'; import { ProductSaleslocation } from 'src/apis/productsSaleslocation/entities/productSaleslocation.entity'; import { ProductTag } from 'src/apis/productTags/entities/productTag.entity'; import { User } from 'src/apis/users/entities/user.entity'; import { Column, DeleteDateColumn, Entity, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToOne, PrimaryGeneratedColumn, } from 'typeorm'; @Entity() @ObjectType() export class Product { @PrimaryGeneratedColumn('uuid') @Field(() => String) id: string; @Column() @Field(() => String) name: string; @Column() @Field(() => String) description: string; @Column() @Field(() => Int) price: number; @Column({ default: false }) //시작시 디폴트값 @Field(() => Boolean) isSoldout: boolean; // soldedAt: Date // @Column({ default: false }) //시작시 디폴트값 // @Field(() => Boolean) // isDeleted: boolean; // @Column({ default: null }) //시작시 디폴트값 // @Field(() => Date) // DeletedAt: Date; @DeleteDateColumn() @Field({ nullable: true }) deletedAt: Date; @JoinColumn() @OneToOne(() => ProductSaleslocation) @Field(() => ProductSaleslocation) productSaleslocation: ProductSaleslocation; @ManyToOne(() => ProductCategory) @Field(() => ProductCategory) productCategory: ProductCategory; @ManyToOne(() => User) @Field(() => User, { nullable: true }) user: User; @JoinTable() @ManyToMany(() => ProductTag, (productTags) => productTags.products) @Field(() => [ProductTag]) productTags: ProductTag[]; } /*tag가 배열이다 그래프QL에서 배열은 양쪽으로 감싸는 게 배열이다. */ 위 product.enttity.ts를 수정한 이유는 DB에 deletedAt 컬럼이 null, userId 컬럼이 null로 되어 있어서 아래와 같이 추가해주었습니다. 그래도 똑같은 에러가 발생하네요. @Field({ nullable: true }) deletedAt: Date; @ManyToOne(() => User) @Field(() => User, { nullable: true }) user: User;

  • node.js
  • docker
  • javascript
  • express
  • nodejs
  • rest-api
  • tdd
  • nestjs
  • NestJS
LI 댓글 1 좋아요 0 조회수 671

1:1 관계 등록 API 질문입니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

//18-03의 방법 2. 상품과 상품 거래위치를 같이 등록하는 경우 async create({ createProductInput }) { const { productSaleslocation, ...product } = createProductInput; console.log( '어떻게 받아오는지 createProductInput:::::::::찍어보자 ', createProductInput, ); console.log( '서비스단에서 productSaleslocation::::::::', productSaleslocation, ); // console.log('서비스단에서...product:::::::::::::::', ...product); const result = await this.productSaleslocationRepository.save({ ...productSaleslocation, // }); console.log('서비스단에서 result:::::', result); const result2 = await this.productRepository.save({ ...product, productSaleslocationId: result.id, }); console.log('서비스단에서 result2:::::', result2); return result2; } 위를 grpahql 에서 데이터를 전송해보면, 터미널창에서 아래와 같이 나옵니다. 어떻게 받아오는지 createProductInput:::::::::찍어보자 [Object: null prototype] { name: '마우스', description: '참좋은마우스', price: 2000, productSaleslocation: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } } 서비스단에서 productSaleslocation:::::::: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } query: START TRANSACTION query: INSERT INTO `product_saleslocation`(`id`, `address`, `addressDetail`, `lat`, `lng`, `meetingTime`) VALUES (?, ?, ?, ?, ?, ?) -- PARAMETERS: ["f6bc848d-42ff-42c5-a454-39e8a9106dac","구로","구로역",1,1,"2022-10-30T00:00:00.000Z"] query: COMMIT 서비스단에서 result::::: { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z, id: 'f6bc848d-42ff-42c5-a454-39e8a9106dac' } query: START TRANSACTION query: INSERT INTO `product`(`id`, `name`, `description`, `price`, `isSoldout`, `deletedAt`, `productSaleslocationId`, `productCategoryId`, `userId`) VALUES (?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) -- PARAMETERS: ["a09e9c56-4b45-420d-98ec-c075da6014e0","마우스","참좋은마우스",2000] query: SELECT `Product`.`id` AS `Product_id`, `Product`.`isSoldout` AS `Product_isSoldout`, `Product`.`deletedAt` AS `Product_deletedAt` FROM `product` `Product` WHERE ( `Product`.`id` = ? ) AND ( `Product`.`deletedAt` IS NULL ) -- PARAMETERS: ["a09e9c56-4b45-420d-98ec-c075da6014e0"] query: COMMIT 서비스단에서 result2::::: { name: '마우스', description: '참좋은마우스', price: 2000, productSaleslocationId: 'f6bc848d-42ff-42c5-a454-39e8a9106dac', deletedAt: null, id: 'a09e9c56-4b45-420d-98ec-c075da6014e0', isSoldout: false } 어떻게 받아오는지 createProductInput:::::::::찍어보자 [Object: null prototype] { name: '마우스', description: '참좋은마우스1', price: 2000, productSaleslocation: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } } 서비스단에서 productSaleslocation:::::::: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } query: START TRANSACTION query: INSERT INTO `product_saleslocation`(`id`, `address`, `addressDetail`, `lat`, `lng`, `meetingTime`) VALUES (?, ?, ?, ?, ?, ?) -- PARAMETERS: ["33a4c94a-886d-4f76-9226-a363afc4b7e4","구로","구로역",1,1,"2022-10-30T00:00:00.000Z"] query: COMMIT 서비스단에서 result::::: { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z, id: '33a4c94a-886d-4f76-9226-a363afc4b7e4' } query: START TRANSACTION query: INSERT INTO `product`(`id`, `name`, `description`, `price`, `isSoldout`, `deletedAt`, `productSaleslocationId`, `productCategoryId`, `userId`) VALUES (?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) -- PARAMETERS: ["a97bb588-3074-4f1b-abaf-a9d244616dd3","마우스","참좋은마우스1",2000] query: SELECT `Product`.`id` AS `Product_id`, `Product`.`isSoldout` AS `Product_isSoldout`, `Product`.`deletedAt` AS `Product_deletedAt` FROM `product` `Product` WHERE ( `Product`.`id` = ? ) AND ( `Product`.`deletedAt` IS NULL ) -- PARAMETERS: ["a97bb588-3074-4f1b-abaf-a9d244616dd3"] query: COMMIT 서비스단에서 result2::::: { name: '마우스', description: '참좋은마우스1', price: 2000, productSaleslocationId: '33a4c94a-886d-4f76-9226-a363afc4b7e4', deletedAt: null, id: 'a97bb588-3074-4f1b-abaf-a9d244616dd3', isSoldout: false } 강의에서 설명해주신 코드는 const result2 = await this.productRepository.save({ ...product, productSaleslocation: result, }); console.log('서비스단에서 result2:::::', result2); return result2; } ...product를 하면 product 테이블에 product와 관련된 데이터(name, description, price) 가 DB 테이블에 들어가는 것은 이해가 되었는데, productSaleslocation: result 라고 하면, DB에 lnt, lng, meetingtime, address, adressDetail까지 전부 들어가는 게 아닌가요? 왜 DB를 확인해보면, productSaleslocation의 id 값만 productSaleslocationId 컬럼에 들어가게 되는 것인가요? 그래서 product 테이블에 productSalesloactionId 라는 컬럼이 있어서 아래와 같이 result2 코드를 작성해보았습니다. const result2 = await this.productRepository.save({ ...product, productSaleslocationId: result.id, }); 이렇게 코드를 작성하면, 상품테이블에 productSaleslocationId 컬럼이 있으니, productSaleslocationId : result.id 를 해줘서 DB에 productSaleslocationId 값을 넣을 수 있는게 왜 아닌지 이해가 가지 않습니다. 왜 productSaleslocationId : result.id 라고 하면 터미널창에는 찍히지만, DB에 아무것도 들어가지 않는 것일까요? 오히려 productSaleslocation: result 라고 하면, productSaleslocation의 lnt, lng, meetingtime, address, adressDetail 은 하나도 들어가지 않고, 어떠한 에러가 발생하지 않고, productSaleslocation의 id값만 외래키로 DB에 잘 들어가게 되는것일까요?

  • express
  • node.js
  • tdd
  • nodejs
  • rest-api
  • docker
  • javascript
  • nestjs
  • NestJS
LI 댓글 1 좋아요 0 조회수 357

PartialType과 OmitType 동시 적용

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

포트폴리오 과정의 'N:M 등록 및 조회/회원가입'을 처리하는 중 질문할 것이 나와 질문을 드립니다. User의 생성부분을 구현하기 위해 CreateUserInput 타입을 만들었고 해당 부분에서 유저 아이디, 패스워드, 이메일 등을 기입하도록 하였습니다. @InputType() export class CreateUserInput { @Field(() => String) loginId: string; @Field(() => String) @MinLength(8) password: string; @Field(() => String) name: string; @Field(() => String) address: string; @Field(() => String) @IsPhoneNumber('KR') phone: string; @Field(() => String) @IsEmail() @Transform(({ value }) => value.toLowerCase()) email: string; } 그리고 User의 수정 부분을 구현하기 위해 UpdateUserInput 타입을 만들었습니다. 단순히 OmitType으로 CreateUserInput 부분을 넘겨 만들었습니다만, API 동작에서 패스워드 부분을 넘기지 않으면 필수 항목을 입력하지 않았다고 수정이 되지 않았습니다. @InputType() export class UpdateUserInput extends OmitType(CreateUserInput, ['loginId', 'email'], InputType) { } 그래서 그냥 PartialType까지 상속하고 싶었습니다만 타입스크립트도 다중 상속을 지원하지 않는지 OmitType과 PartialType을 함께 쓸 수 없었습니다. 이러면 그냥 CreateUserInput처럼 전부 구현할 수 밖에 없나요? API 부분에서 넘기지 않은 부분은 그냥 그대로 냅두는 것을 목적으로 합니다.

  • rest-api
  • node.js
  • express
  • tdd
  • docker
  • javascript
  • nodejs
  • nestjs
  • NestJS
ZZAMBA 댓글 1 좋아요 0 조회수 625

spring initializr를 설치해도 뜨질 않습니다.

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

inteillj communiuty로 사용하면 spring initializr을 직접 다운 받아야 한다고 해서 강의랑 똑같이 설정하고 다운받았는데도 new project에 spring initializr가 안뜹니다...

  • spring-boot
  • rest-api
댓글 1 좋아요 0 조회수 479

나만의 검색 API : 캐싱의 유효시간 관련, 폴링 시 일부 컬럼만을 ELK에 넣었을 때

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

안녕하세요. ELK와 Redis를 이용하여 검색 API 숙제를 하는 중 질문이 있습니다. 캐시를 이용하여 검색 결과를 반환할 때, 폴링 등을 통해서 새로운 데이터가 들어온다면 기존의 캐시를 이용하지 못할 것 같은데요, 제 생각으로는 강의중 말씀해주신 정확도를 포기하는 대신 성능을 얻기 위해서 캐시를 일단 TTL 만료 이전까지 사용해야 할 것 같습니다만, 좋은 방법이 무엇일까요? 강의 내에서는 폴링을 통해 테이블 컬럼의 전체가 아닌 일부 컬럼만을 Elasticsearch에 넣으셨었는데 전체를 넣지않는 이유가 있을까요? (데이터가 커져서? Join 데이터를 포함하면 많아질 것 같기는 합니다.) 일부만 넣는 이유가 있다면 게시판 검색을 만든다고 생각하면 제가 생각한 아래의 방식으로도 사용되는 편일까요? 1) ID를 포함하여 검색 결과 목록에 노출될 제목 등을 얻어오는 데에 ELK와 캐시를 이용 2) 상세보기를 클릭했을 때는 DB 인덱스로 사용되는 ID를 이용하여 디비에서 필요한 모든 컬럼을 얻어오기 강의 막바지를 향해 달려가고 있습니다. 좋은 강의 제공해주셔서 감사드립니다.

  • javascript
  • node.js
  • docker
  • express
  • nodejs
  • tdd
  • nestjs
  • rest-api
  • NestJS
제리제리 댓글 1 좋아요 0 조회수 471

질문있습니다!

미해결

mongoDB 기초부터 실무까지(feat. Node.js)

안녕하세요 수업 질문입니다. 저만 그런건지 age index를 생성하기 전인데도 불구하고, age로 sort 할 경우 성능이 오히려 3배 가량 향상됩니다.. ㅜㅜ sort를 작성할 경우 수업과 동일하게 sort_key_generator는 나타나지 않고, documents returned도 0 으로 표기 됩니다. 하지만 explain 탭이 아닌 documents탭에서는 정렬방식이 적용 되어 문제없이 조회되는 걸로 보아 문법을 작성을 잘못 한것 같지않고, sort를 작성하면 explain이 제대로 나타나지 않아 헤매이고있습니다. index의 장점을 직접 체험하기 위해 데이터는 약 100만개 정도 생성한 상태로 따라해보는데, 의도와는 다른 현상이 나타나 질문드립니다!!

  • nodejs
  • node.js
  • rest-api
  • mongodb
  • rest-api
  • aws
  • dbms/rdbms
  • DBMS/RDBMS
  • javascript
  • 데이터-엔지니어링
  • 데이터 엔지니어링
꼴쥐 댓글 1 좋아요 2 조회수 480

맥사용자가 아닌경우 리눅스 설치를 위해 별도 컴퓨터가 있어야 할까요?

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

Docker - MongoDB 연결 수업전 까지 들었습니다. 현재까지는 리눅스 설치 없이 문제없이 진행중 입니다. 질문1. 맥북이 아닌경우 컴퓨터 두대(리눅스, 인강용) 로 진행하는 건가요?

  • node.js
  • javascript
  • express
  • rest-api
  • nodejs
  • tdd
  • docker
  • nestjs
  • NestJS
김주원 댓글 1 좋아요 0 조회수 370

Docker 2 - API 패키징 "/" 슬러시 생략가능 여부 질문

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

질문1. 아래 코드중에서 마지막 슬러시 " / " 는 생략 가능 가능하지요? Dockerfile WORKDIR /myfolder/ COPY ./package.json /myfolder/ COPY ./yarn.lock /myfolder/

  • nodejs
  • node.js
  • docker
  • express
  • javascript
  • rest-api
  • nestjs
  • tdd
  • NestJS
김주원 댓글 1 좋아요 0 조회수 374

강의 소스 다운로드 경로

미해결

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part6: 웹 서버

좋은 강의 감사합니다. 강의 프로그램 소스는 어디서 받을 수 있나요?

  • rest-api
  • blazor
  • asp.net-core
  • ASP.NET-Core
  • web-api
추윤식 댓글 0 좋아요 0 조회수 493

git 주소나 참고자료는 어디서 볼수있을까요 ??

미해결

[리뉴얼] 처음하는 파이썬 백엔드와 웹기술 입문 (파이썬 중급, flask[플라스크] 로 이해하는 백엔드 및 웹기술 기본) [풀스택 Part1-1]

소스자료 보고싶고 참고자료도 보고싶습니다

  • python
  • rest-api
  • flask
gusdnr598 댓글 1 좋아요 0 조회수 535

소셜로그인 43:30

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

제 본인 프로젝트에 해당되는 내용입니다. 구글인증까지는 무난하게 되는데요. 1. 파란색이 Entity() 에서 뽑아온 Column명에 해당하는 변수로 알고 있습니다. 2. 구글인증을 통과한 후에 name, email, password를 req.user로 넣어서 보내주는 걸로 알고 있습니다. <질문의도> name, email, password를 req.user객체에 넣어서 받았으니, req.user.name , req.user.email , req.user.password, 데이터를 꺼내서 개별적으로 컬럼에 저장되는 변수에 userName = req.user.name userEmail = req.user.email userPassword = req.user.password 위와 같이 저장되어야 하지 않아 생각해 봅니다. 그런데 아래 오류메시지의 경우 <property 'email' does not exist on type 'User & Pick<User, userEmail, userName, userPassword> ↑ 왜(why) req.user에서 userEmail, userName, userPassword를 찾고 있는지 이해가 가지 않습니다. ---------------------------------------------------------- 제가 지금 머릿속에서 뭔가 꼬인 것 같습니다. 답변 부탁드릴께요. 진도를 못나가고 있어요ㅠ

  • tdd
  • node.js
  • nodejs
  • javascript
  • express
  • docker
  • rest-api
  • rest-api
  • nestjs
  • NestJS
똑같이썼는데안돼 댓글 1 좋아요 0 조회수 518

N:N 구현 시, update 부분에서 컴파일 에러가 납니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

async update({ productId: id, updateProductInput }: { productId: string, updateProductInput: UpdateProductInput }) { const beforeProduct = await this.findOne(id); const updatedProduct = { ...beforeProduct, id, //덮어쓰기 ...updateProductInput, // 덮어쓰기 }; return await this.productRepository.save(updatedProduct); } 위는 코드부입니다. 일단 영상에서 update부분을 만진거 같지는 않은데, 여기서 updateProductInput의 productTags가 string 타입 배열이라 저장 시 충돌이 일어나네요. 태그 생성부분을 따로 메서드 추출을 해야할까요?

  • node.js
  • nodejs
  • docker
  • express
  • javascript
  • rest-api
  • nestjs
  • tdd
  • NestJS
ZZAMBA 댓글 1 좋아요 0 조회수 319

Entity 구현 - 1: N, N : M 이 강의10분 13초에서

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

안녕하세요. 위 파일은 product.entity.ts 파일입니다. product.entity.ts 파일에서 @JoinColumn() 을 productSaleslocation 테이블에만 해주시는 이유가 무엇인지 알 수 있을까요? product테이블과 서로 관계를 맺고 있는 productSaleslocation 테이블과 users 테이블에도 @JoinColumn()을 해줘야 하는 것 아닌가요? 상품테이블은 productCategory테이블과(상품카테고리_id)ManyToOne 관계를 맺고 있으며, User 테이블과 (유저_id) ManyToOne 관계를 맺고 있어서 각각 JoinColumn을 해줘야 하는 것으로 생각했는데, 제 생각이 틀린 것일까요? 좋은 강의 해주셔서 진심으로 감사합니다!

  • tdd
  • node.js
  • docker
  • javascript
  • rest-api
  • express
  • rest-api
  • nodejs
  • nestjs
  • NestJS
LI 댓글 1 좋아요 0 조회수 469

entity 구현 1:1 강의 질문입니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

안녕하세요. 좋은 강의 감사합니다. entity 구현 1:1 강의에서 npm i 후 package: '@angular-devkit/core@15.1.4', Unsupported engine 이라고 나오는데, 이렇게 터미널에 찍히는 이유가 무엇인가요? 계속 사용할 경우 어떤 문제가 발생하나요? npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics-cli@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-plugin-base@3.7.1: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-types@3.7.1: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated apollo-server-express@3.11.1: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-reporting-protobuf@3.3.3: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md npm WARN deprecated apollo-server-core@3.11.1: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. added 806 packages, and audited 807 packages in 21s 98 packages are looking for funding run `npm fund` for details found 0 vulnerabilities

  • node.js
  • docker
  • nodejs
  • tdd
  • express
  • javascript
  • nestjs
  • rest-api
  • NestJS
LI 댓글 2 좋아요 0 조회수 2374

Error: Access denied for user 'root'@'localhost' (using password: YES) 에러

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

아래 질문과 동일한 에러가 발생해서 알려주신 해결책으로 진행했는데...이번에는 다른 문제가 발생했습니다. Error: Access denied for user 'root'@' localhost ' (using password: YES) 구글링으로 아무리 찾아서 해보아도 해결이 안되고 있습니다. 아래 테이블 만들었구요 권한문제인가 싶어서 user 테이블의 root 의 authentication_string 을 바꿔도 해쉬값으로 저장되지도 않고...현재는 NULL로 해놓고 있는데 도무지 해결이 되지 않습니다. 도와주세요 ㅠㅠ

  • javascript
  • node.js
  • rest-api
  • tdd
  • express
  • nodejs
  • docker
  • nestjs
  • NestJS
갱프런 댓글 3 좋아요 0 조회수 3066

save 파라미터에 스프레드 안쓰고 객체를 넘겨도 되나요?

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

const savedProductSaleslocation = await this.productSaleslocationRepository.save({ ...productSaleslocation, }); 위 코드에서, 아래처럼 코드를 바꿔봤습니다. const savedProductSaleslocation = await this.productSaleslocationRepository.save(productSaleslocation); 정상 작동했는데 차이가 무엇인가요? 또 권장하는 방식은 무엇인가요?

  • node.js
  • tdd
  • nodejs
  • javascript
  • docker
  • express
  • nestjs
  • rest-api
  • NestJS
ZZAMBA 댓글 1 좋아요 0 조회수 511

우분투에 몽고디비 설치 후 실행이 안됩니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

제가 사용중인 우분투 버젼입니다. 몽고 디비 설치를 노션 자료에 있는대로도 설치를 해보고, 삭제하고 공식문서에 있는대로도 설치를 해봤는데 (노션에는 공개키가 server-5.0 으로 되어있고 공식 문서는 server-6.0 으로 되어있더라구요) 설치 후에 실행을 해보면 [fail] 이 뜨면서 실행이 되지 않네요. 구글링해서 여러가지 방법 따라해봐도 계속 fail 이어서 질문글 올립니다. 추가로 이상한 점은 mongod --version 이라고 치면 버전이 나오는게 아니라 Illegal instruction 라고 나옵니다. ++구글에 mongod --version Illegal instruction 라는 키워드로 검색을 해서 https://info-orgs.blogspot.com/2021/10/how-to-install-mongodb-v44-mongodb.html 이 글을 보고 몽고 디비 4.4 버전을 설치해봤는데 mongod --version 이라고 치면 이제 버전이 나오긴 하는데 여전히 실행은 실패하네요. $ service mongod start * Starting database mongod /etc/init.d/mongod: 136: ulimit: error setting limit (Operation not permitted) /etc/init.d/mongod: 142: ulimit: error setting limit (Operation not permitted) start-stop-daemon: start-stop-daemon: unable to open pidfile '/var/run/mongod.pid' for writingunable to set gid to 121 (Permission denied) (Operation not permitted) start-stop-daemon: child returned error exit status 2

  • mongodb
  • nodejs
  • express
  • tdd
  • javascript
  • docker
  • rest-api
  • NestJS
alice 댓글 2 좋아요 0 조회수 1252

현재 nodemon 커널 실행 nodemon yarn aaa 부분 수강중 입니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

윈도우 환경에서 yarn 이 에러가 나서 npm으로 진행중입니다~ "npm yarn 은 성능만 차이가 나고 명령어는 똑같다" 라고 알고 있는데, 명령어도 다른건가 라는 의문이 들어 질문 드립니다. npm의 경우는 pakage.js 에 아래와 같이 작성 후 npm aaa 로는 실행이 안되고, npm run aaa 로 만 실행이 되는데, yarn aaa 는 실행이 잘 되는듯 하네요 왜 그런 걸까요? run 이 생략된 걸까요? 웹펙 쪽을 먼저 학습하고 가야 할지... 수업 들으면서 모르는걸 다 질문드려도 될까요? package.json script:{ "aaa":"nodemon app.js" }

  • javascript
  • node.js
  • nodejs
  • docker
  • rest-api
  • rest-api
  • tdd
  • nestjs
  • express
  • NestJS
김주원 댓글 1 좋아요 0 조회수 321

퍼사드 패턴 코드 공유 드립니다!

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

퍼사드 패턴 관련하여 노션 코드는 강의 코드와 다르기때문에, 에러를 해결하지 못하신 분들을 위해서 코드 공유 드립니다. (에러메세지로 위치, 그 위치에 해당하는 강사님이 강의 진행시 적어주셨던 코드와 대조하여서 작성하였습니다) // index.js import { checkValidationPhone, getToken, sendTokenToSMS} from './phone.js' // requestAnimationFrame('./phone.js') console.log('안녕하세요~~'); function createTokenOfPhone(myphone) { // 1. 휴대폰번호 자릿수 맞는지 확인하기 const isValid = checkValidationPhone(myphone); if (isValid) { // 2. 핸드폰 토큰 6자리 만들기 const mytoken = getToken(); // 3. 핸드폰번호에 토큰 전송하기 sendTokenToSMS(myphone, mytoken); } } createTokenOfPhone('01012345678', 6); // phone.js export function checkValidationPhone(myphone) { if (myphone.length !== 10 && myphone.length !== 11) { console.log('에러 발생!!! 핸드폰 번호를 제대로 입력해 주세요!!!'); return false; } else { return true; } } export function getToken(count) { const mycount = 6 if (count === undefined|null) { console.log('에러 발생!!! 갯수를 제대로 입력해 주세요!!!'); return; } else if (mycount <= 0) { console.log('에러 발생!!! 갯수가 너무 적습니다!!!'); return; } else if (mycount > 10) { console.log('에러 발생!!! 갯수가 너무 많습니다!!!'); return; } const result = String(Math.floor(Math.random() * 10 ** count)).padStart(mycount,'0'); return result; // console.log(result) } export function sendTokenToSMS(fff, ggg) { console.log(fff + '번호로 인증번호' + ggg + '를 전송합니다!!'); }

  • node.js
  • rest-api
  • tdd
  • javascript
  • express
  • docker
  • nestjs
  • nodejs
  • NestJS
최다니엘 댓글 0 좋아요 4 조회수 510

yarn init 에러 문의

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

안녕하세요 선생님 퍼샤드 패턴에서 58분쯤 보면 yarn init이라고 입력을 하시던데 저의 경우에는 에러가 뜹니다. ERROR: init is not COMMAND nor fully qualified CLASSNAME. Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS] or yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS] 왜 입력 값이 충족되지 않았다고 하는 걸까요? 참고로 제 node.js 버전은 18대입니다. 혹시몰라 전체적인 에러메세지 같이 첨부합니다! (base) ➜ 01-05-token-count-api-facade-import git:(master) ✗ yarn init ERROR: init is not COMMAND nor fully qualified CLASSNAME. Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS] or yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS] where CLASSNAME is a user-provided Java class OPTIONS is none or any of: --buildpaths attempt to add class files from build tree --config dir Hadoop config directory --daemon (start|status|stop) operate on a daemon --debug turn on shell script debug mode --help usage information --hostnames list[,of,host,names] hosts to use in worker mode --hosts filename list of hosts to use in worker mode --loglevel level set the log4j level for this command --workers turn on worker mode SUBCOMMAND is one of: Admin Commands: daemonlog get/set the log level for each daemon node prints node report(s) rmadmin admin tools scmadmin SharedCacheManager admin tools Client Commands: applicationattempt prints applicationattempt(s) report app|application prints application(s) report/kill application/manage long running application classpath prints the class path needed to get the hadoop jar and the required libraries cluster prints cluster information container prints container(s) report envvars display computed Hadoop environment variables fs2cs converts Fair Scheduler configuration to Capacity Scheduler (EXPERIMENTAL) jar <jar> run a jar file logs dump container logs nodeattributes node attributes cli client queue prints queue information schedulerconf Updates scheduler configuration timelinereader run the timeline reader server top view cluster information version print the version Daemon Commands: nodemanager run a nodemanager on each worker proxyserver run the web app proxy server registrydns run the registry DNS server resourcemanager run the ResourceManager router run the Router daemon sharedcachemanager run the SharedCacheManager daemon timelineserver run the timeline server SUBCOMMAND may print help when invoked w/o parameters or with -h. 구글링은 해봐도 못찾겠고, 그나마 힌트가 될만한건 이전에 hadoop 설치하면서 yarn이 같이 깔렸던 것 같은데, 그것과 충돌이 되서 그럴 수 있다는 정보까진 찾았습니다! brew uninstall hadoop 으로 하둡을 날려버렸더니 yarn 명령이 아예 작동이 안되는 것으로 봐서는 맞는 것 같습니다. brew install yarn으로 설치 다시 해줬더니 작동은 잘 됩니다! 선생님 이럴경우에 삭제 말고 따로 하둡과 충돌할 경우에 hadoop의 yarn과 node.js의 yarn을 별도로 관리하는 방법은 없을까요?

  • javascript
  • node.js
  • nodejs
  • docker
  • express
  • rest-api
  • tdd
  • nestjs
  • NestJS
최다니엘 댓글 1 좋아요 0 조회수 883

인기 태그

인프런 TOP Writers

주간 인기글