Skip to content

[BUG] deploy에서 캔디 추가 안 됨 #149

Description

@LeeJE20

POST {{baseUrl}}/api/candies

로컬에서는 됨

리퀘스트

{
    "category_id": "622930547b0677c52da107b6",
    "candy_name": "testCandy",
    "shopping_link": "https://www.11st.co.kr/products/1236879639",
    "category_image_url": "",
    "detail_info": ""
}

ec2에서 ~/.pm2/logs 에서 cat dist-out.log 확인해보면

SyntaxError: Unexpected token   in JSON at position 3
    at JSON.parse (<anonymous>)
    at Config.loadFromPath (/var/www/html/HandyCandy_Server/node_modules/aws-sdk/lib/config.js:483:24)
    at Function.<anonymous> (/var/www/html/HandyCandy_Server/dist/services/CandiesService.js:229:28)
    at Generator.next (<anonymous>)
    at /var/www/html/HandyCandy_Server/dist/services/CandiesService.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/var/www/html/HandyCandy_Server/dist/services/CandiesService.js:27:12)
    at Function.addCandy (/var/www/html/HandyCandy_Server/dist/services/CandiesService.js:224:16)
    at /var/www/html/HandyCandy_Server/dist/controllers/candies.js:46:52
    at Generator.next (<anonymous>)
    at /var/www/html/HandyCandy_Server/dist/controllers/candies.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/var/www/html/HandyCandy_Server/dist/controllers/candies.js:4:12)
    at addCandy (/var/www/html/HandyCandy_Server/dist/controllers/candies.js:37:32)
    at Layer.handle [as handle_request] (/var/www/html/HandyCandy_Server/node_modules/express/lib/router/layer.js:95:5)
    at next (/var/www/html/HandyCandy_Server/node_modules/express/lib/router/route.js:137:13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions