solve(9)
-
AWS multer-s3 오류 TypeError: this.client.send is not a function
TypeError: this.client.send is not a function 이 에러는 AWS S3 에 접근할 수 없다는 에러였다. aws 에 퍼플릭 엑세스로 설정을 바꾼뒤 해결되었다. 이후 다른 문제가 발생했는데, req.file 을 불렀을때 값이 비어있었고, 당연히 req.file.location 도 작동하지 않았다. 아래는 해당 코드이다. // awsMulterModules.js const multer = require("multer"); const AWS = require("aws-sdk"); const multerS3 = require("multer-s3"); const path = require("path"); require("dotenv").config(); AWS.config.upda..
2023.07.21 -
CodeDeploy 를 사용한 자동 배포 오류
Script at specified location: scripts/before-deploy.sh run as user ubuntu failed with exit code 1 첫번째 문제는 repository 명을 잘못 입력했었다. #!/bin/bash REPOSITORY=/home/ubuntu/mini-BE # 여기에서 mini_BE 로 잘못 적혀있었다. cd $REPOSITORY sudo npm ci npm start 그렇기 때문에 우분투 환경에서 mini_BE 와 mini-BE 두 폴더가 생성되었었다. 두 폴더를 모두 삭제해 주었고 코드 수정후 다시 클론하여 폴더를 가져왔다. appspec.yml 파일이다. version: 0.0 os: linux files: - source: / destinati..
2023.07.16 -
TypeError: test is not a function [ Jest ] [express ]
개요 jest 를 이용해 service 단에서 단위테스트를 연습하다 겪은 에러이다. 에러 코드 FAIL __tests__/unit/posts.service.unit.spec.js ● Test suite failed to run TypeError: test is not a function 18 | }); 19 | > 20 | test("Posts Service findAllPosts Method", async () => { | ^ 21 | const findAllPostReturnValue = [ 22 | { 23 | postId: 1, at test (__tests__/unit/posts.service.unit.spec.js:20:3) at Object.describe (__tests__/unit/pos..
2023.07.12