38,500원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
네이버 클라우드 미사용시
안녕하세요 강사님 강의 너무 잘듣고있습니다. 제가 네이버 클라우드를 현재 사용할수없어서 server 폴더 안에 img 폴더를 만들어서 이미지를 관리하고있는데요. 그래서 유저 프로필 사진을 변경할때에도 로컬폴더에서 변경해주려고 했습니다. 문제는 firebase에서 photoURL에 로컬 url값을 줘야하는데 photoURL이 로컬 url은 못받는거같습니다. 혹시 다른 방법이 있을까요? 감사합니다
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
배포 후 이미지가 사라짐 (네이버 클라우드 설정 X)
배포 후에 이미지가 안나옵니다 ㅜㅜ 네이버 클라우드는 사용안하고 있고 로컬서버에 이미지 저장중인데 혹시나해서 Detail.js 에서 const port = process.env.PORT || 5000; <img src={`http://localhost:${port}/${props.PostInfo.image}`} alt="" style={{ width: "80%", height: "auto" }} /> 로 바꿔보았지만 나오지 않습니다 ㅜㅜ 해결방법있을까요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
네이버 클라우드 연결 질문
안녕하세요! 혹시 네이버 클라우드가 강의 찍으신 시점에서 업데이트가 되었나요...? 외부저장소에 업로드가 되지 않습니다..ㅠ 위는 서버쪽입니다. 위는 클라이언트 코드입니다.
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
배포오류 (open app 눌렀을시 그냥 빈페이지)
2022-07-10T23:48:14.000000+00:00 app[api]: Build started by user snrn4040@gmail.com2022-07-10T23:48:37.000000+00:00 app[api]: Build succeeded2022-07-10T23:48:37.031758+00:00 app[api]: Deploy 46e6a157 by user snrn4040@gmail.com2022-07-10T23:48:37.031758+00:00 app[api]: Release v6 created by user snrn4040@gmail.com2022-07-10T23:48:41.631175+00:00 heroku[web.1]: Restarting2022-07-10T23:48:41.657465+00:00 heroku[web.1]: State changed from up to starting2022-07-10T23:48:42.609970+00:00 heroku[web.1]: Stopping all processes with SIGTERM2022-07-10T23:48:42.937603+00:00 heroku[web.1]: Process exited with status 1432022-07-10T23:48:44.186556+00:00 heroku[web.1]: Starting process with command `node index.js`2022-07-10T23:48:45.765492+00:00 app[web.1]: Example app listening on port 44982022-07-10T23:48:45.765528+00:00 app[web.1]: Connecting mongodb2022-07-10T23:48:45.929890+00:00 heroku[web.1]: State changed from starting to up2022-07-10T23:48:46.919381+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=8e46f24d-0667-4b4c-948f-3cbecf3ec01e fwd="209.6.106.151" dyno=web.1 connect=0ms service=8ms status=200 bytes=1143 protocol=https2022-07-10T23:48:47.215943+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=233bb566-642e-4a52-a7b5-6414dbadaade fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=200 bytes=1143 protocol=https2022-07-10T23:48:47.321574+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=8e281f92-e3fb-41ba-b630-65470310bd4f fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:48:47.334018+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=3d98e27e-2913-44ff-b590-3e820993d7fa fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:48:49.307219+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=75ae5617-9391-497e-b547-2deef71f13f8 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:48:49.438076+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=c9c8bd11-25c5-4745-98b9-f3a0db9c77f6 fwd="209.6.106.151" dyno=web.1 connect=0ms service=3ms status=304 bytes=237 protocol=https2022-07-10T23:48:49.466399+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=8e8fcaac-6aad-4410-a5a9-0c7b47e7652f fwd="209.6.106.151" dyno=web.1 connect=0ms service=20ms status=304 bytes=237 protocol=https2022-07-10T23:48:49.470878+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=86abe0a5-d2e4-4f64-9cb9-08cd20825bc2 fwd="209.6.106.151" dyno=web.1 connect=0ms service=16ms status=304 bytes=237 protocol=https2022-07-10T23:49:33.997708+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=18850ea0-bc9a-4c8f-aa0a-8dd1060303fc fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=200 bytes=1143 protocol=https2022-07-10T23:49:34.243502+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=424ab620-df2c-4581-9084-7b263edf3c37 fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https2022-07-10T23:49:34.241970+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=fdd67508-6d25-452a-b37b-9e605e0c6a3f fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https2022-07-10T23:49:34.244984+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=5906f0ce-8ec1-4fae-8cd7-a708e5b583aa fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=200 bytes=1143 protocol=https2022-07-10T23:50:11.264959+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=7735abcf-f132-43f8-a50e-f3a2627199da fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:11.557590+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=04ec04fc-cd1e-4597-b942-6fb00f37364c fwd="209.6.106.151" dyno=web.1 connect=0ms service=24ms status=304 bytes=237 protocol=https2022-07-10T23:50:11.572940+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=a75672c3-de76-41eb-9f9a-b0372c8a708c fwd="209.6.106.151" dyno=web.1 connect=0ms service=34ms status=200 bytes=1143 protocol=https2022-07-10T23:50:11.556456+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=4c21e0d1-4f93-4b0c-a8ed-015aee9a5731 fwd="209.6.106.151" dyno=web.1 connect=0ms service=19ms status=304 bytes=237 protocol=https2022-07-10T23:50:12.332923+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=985320ac-5721-4355-9c05-49a1c9e039fc fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:12.604294+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=e7073bbb-cd50-46dc-b2e6-de2f97f87fb7 fwd="209.6.106.151" dyno=web.1 connect=0ms service=22ms status=304 bytes=237 protocol=https2022-07-10T23:50:12.605653+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=97789063-8372-40eb-9328-f316fc43205a fwd="209.6.106.151" dyno=web.1 connect=0ms service=21ms status=304 bytes=237 protocol=https2022-07-10T23:50:12.606731+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=4ee086a3-6239-42ae-9ac7-c60c9269f7d3 fwd="209.6.106.151" dyno=web.1 connect=0ms service=23ms status=200 bytes=1143 protocol=https2022-07-10T23:50:13.378753+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=b08c7a8b-b9d6-4b29-b44a-33a5b3e80e94 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:13.648889+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=ab30f5b6-b110-4879-b5ce-a8afab8cedef fwd="209.6.106.151" dyno=web.1 connect=0ms service=18ms status=200 bytes=1143 protocol=https2022-07-10T23:50:13.639263+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=8d335ea4-8085-45d6-aeb2-3764b5fe9b2c fwd="209.6.106.151" dyno=web.1 connect=0ms service=7ms status=304 bytes=237 protocol=https2022-07-10T23:50:13.635703+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=a87928c5-d559-4162-80ca-1cbb5900c0da fwd="209.6.106.151" dyno=web.1 connect=0ms service=6ms status=304 bytes=237 protocol=https2022-07-10T23:50:14.312431+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=caa5a38e-cb8b-46c4-a360-1cc79918c559 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:14.463463+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=36c3fbad-1990-49a9-90b7-f623406380ff fwd="209.6.106.151" dyno=web.1 connect=0ms service=4ms status=304 bytes=237 protocol=https2022-07-10T23:50:14.461213+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=1ce31104-b377-45a9-a3b8-bca8f682bb40 fwd="209.6.106.151" dyno=web.1 connect=0ms service=6ms status=304 bytes=237 protocol=https2022-07-10T23:50:14.457702+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=d0a2cacd-2e8f-43e3-8ecc-bc8b4c59b767 fwd="209.6.106.151" dyno=web.1 connect=0ms service=14ms status=200 bytes=1143 protocol=https2022-07-10T23:50:15.205017+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=8d5657a1-9754-44d8-87a6-8d09b04779ee fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:15.337195+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=edb71761-1d40-496c-8ba8-cc46d53e8bce fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=200 bytes=1143 protocol=https2022-07-10T23:50:15.346552+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=da37485a-61f8-4fb9-8f2d-d3b96d6abf51 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:15.348398+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=32588469-bcca-41b2-9bf5-365697f7530e fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:16.068737+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=2088a667-e988-4854-be73-7603ce552d30 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:16.257262+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=21bcbd9a-33c0-4ef8-be63-8b4ae01b2919 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:16.255558+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=879b4a68-35c7-4c02-a7f2-746fa32e201c fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https2022-07-10T23:50:16.257769+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=72c0a21d-7dd8-4c06-b0d5-50daf86ae720 fwd="209.6.106.151" dyno=web.1 connect=0ms service=3ms status=200 bytes=1143 protocol=https2022-07-10T23:50:16.998164+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=94c5d5d2-fa95-4992-8174-6a8534710669 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:16.858986+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=1bb7722a-13a5-4e30-83b8-91fb68329c1a fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:16.988754+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=bfbad11e-3f58-4d20-93f6-1340ab38a961 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:16.996299+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=d893314d-fe64-4212-8690-ee5fad301408 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:17.922158+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=a64f4312-c0a8-4472-ac2f-d5c28a5e65fa fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:50:17.937027+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=23d287f3-57d3-4a15-8682-1a3963703c85 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:17.935286+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=47802123-bac2-404c-98f8-0d16b1fbbc78 fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https2022-07-10T23:50:17.649048+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=8da7df8c-9052-4f3f-b67f-b6066d9c4724 fwd="209.6.106.151" dyno=web.1 connect=0ms service=26ms status=200 bytes=1143 protocol=https2022-07-10T23:50:19.401270+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=84e332b5-b76d-4bf6-995d-a4e233700ec3 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:19.400776+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=81ebfd3e-5758-47be-9831-6491016dc898 fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=200 bytes=1143 protocol=https2022-07-10T23:50:19.410044+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=cce64846-7a9b-41d5-92fb-a06494affbb5 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=304 bytes=237 protocol=https2022-07-10T23:50:19.138757+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=b3ba40fd-8ee2-4e03-8cf4-a4d75caf89b3 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:51:25.578283+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=098d14ef-c715-447a-89c3-bf4dad918298 fwd="209.6.106.151" dyno=web.1 connect=0ms service=31ms status=200 bytes=1143 protocol=https2022-07-10T23:51:25.465406+00:00 heroku[router]: at=info method=GET path="/" host=minseok-community.herokuapp.com request_id=7a678692-4318-4619-b287-e235685c7a4b fwd="209.6.106.151" dyno=web.1 connect=0ms service=13ms status=200 bytes=1143 protocol=https2022-07-10T23:51:25.585086+00:00 heroku[router]: at=info method=GET path="/static/js/main.6f6cdb46.js" host=minseok-community.herokuapp.com request_id=10487c0a-20cd-4ac2-8764-b41653471df7 fwd="209.6.106.151" dyno=web.1 connect=0ms service=33ms status=200 bytes=1143 protocol=https2022-07-10T23:51:25.914267+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=19199f9f-1e4f-450f-8e2b-429ffa59a013 fwd="209.6.106.151" dyno=web.1 connect=0ms service=1ms status=200 bytes=1143 protocol=https2022-07-10T23:51:25.681646+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=minseok-community.herokuapp.com request_id=44b2195c-41ef-4b6e-b117-ca8353249f6d fwd="209.6.106.151" dyno=web.1 connect=0ms service=5ms status=200 bytes=1143 protocol=https2022-07-10T23:51:29.033821+00:00 heroku[router]: at=info method=GET path="/manifest.json" host=minseok-community.herokuapp.com request_id=27c6e07a-104d-4b16-afc5-8e6082ca2cf7 fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https2022-07-10T23:51:29.033048+00:00 heroku[router]: at=info method=GET path="/static/css/main.073c9b0a.css" host=minseok-community.herokuapp.com request_id=817c0d53-5bf1-489b-ae47-fd4ada7c4bec fwd="209.6.106.151" dyno=web.1 connect=0ms service=2ms status=304 bytes=237 protocol=https
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
_id null 오류
어제 올린 오류가 계속 진행중입니다. 오타도 다시한번 확인했는데 이상없는것 같습니다. 콘솔에 오류를 찍어보니까 _id가 null value로 나옵니다... 어떡하면 좋을까요? TypeError: Cannot read property '_id' of null
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
client 단에서 오류가 납니다 ㅜㅜ
[HPM] Error occurred while proxying request localhost:3000/api/reple/submit to http://localhost:5000/ [ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors) 여기 까지 왔는데 댓글 등록을 누르니 client 콘솔에서 이런 에러가 납니다... 정확한 오류 메시지도 안나와서 디버깅도 힘드네요 ㅠㅠ
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
MongoDB에는 이미지 파일을 저장할 수 는 없나요?
Multer를 사용해서 로컬에 파일을 저장해서 사용하지 않고 mongoDB atlas에 저장해서 사용할 수는 없는건가요 ?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
현재 네이버클라우드 사용이 불가능한상황인데
네이버클라우드에 이미지 업로드하는 부분을 하지 않아도 웹 배포하기에 아무문제가 없을까요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
useEffect로 원래 있던 제목과 내용 불러오기가 안되요ㅠ
- 위와 같은 에러가 잡힙니다. 코드의 내용은 이러합니다. 어디서부터 오류가 난지 모르겠습니다 ㅠ
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
안녕하세요~~
혹시 강의를 바탕으로 제 개인 블로그에 정리를 하여도 괜찮을까요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
왜 post.title & post.content일까요?
안녕하세요! 좋은 강의 만들어주셔서 감사합니다. 보다보니 list.js에서 PostList.map((post,idx) => 이부분에서 post를 어떻게 가져올 수 있는지 궁금합니다. 위에 const로 정의를 내리지 않았는데 post는 그냥 가져올 수 있는 걸까요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
server - client 연결
안녕하세요. 열심히 수업을 듣고 있습니다! 자세히 설명해주셔서 큰 도움을 받고 있는데, server-client 연결하는 데에서 계속 '요청 실패'가 떠서요... 뭔가 문제인지 궁금합니다. server 에서 아래와 같이 작성했고 client > scr>Component>List.js에서 다음과 같이 작성했습니다. 말씀하신 setupProxy.js도 깔았고요 뭐가 문제일까요?? ㅜㅜ
- 해결됨MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
배포 오류입니다..
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요! 강사님.. 제가 혼자 여러번 시도를 했는데 계속 오류가 나서 글 남깁니다.. 배포를 완료했는데 인덱스 화면이 Not Found 라고 떠서요 제가 어디서부터 잘못했는지.. 이 전에 배포는 H10, 503 코드가 떠서 ㅠㅠ 그건 삭제하고 또 다시 해보고 빌드팩도 추가해보고. 인터넷에 나와있는 방법은 다 해봤는데 정말 안되서 도움 요청드립니다. ㅠㅠ 다시 지우고 마지막이다 싶어 배포해보니.. 이번엔 H20 에러가 뜹니다 앱 부팅 시간 초과라고 하네요.. 하.. 그리고 아래 질문에 답변 달아주신대로.. 확인은 전부 해봤습니다.. package.json 파일의 engines의 node와 npm 버전 package.json 파일의 start와 build 명령어(혹시 start 명령어에 nodemon을 사용하셨다면, node로 바꿔주시길 바랍니다.) Procfile, root dir에 있어야 합니다. 환경변수 (port, mongoURL 등) 세팅API 키들은 헤로쿠 앱에도 정상적으로 등록되어 있는지 확인하시길 바랍니다. heroku에 push할 때 서버폴더를 루트디렉토리로 푸쉬하였는지 그럼에도 at=error code=H10 desc="App crashed" 이렇게 뜹니다 ㅠ ㅠ
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
마이페이지 이미지 불러오기 오류
마이페이지에서 이미지를 불러오지 못하네요ㅜㅜㅠ 또한 다른 이미지로 변경 하려해도 이런 오류가 뜹니다!! 아무래도 클라우드에서 불러오지 못하는것같은데 무슨 이유인지 잘 모르겠습니다ㅠㅠㅠ
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
회원가입 하기 섹션 질문입니다!
백업도 안해놓고 컴터를 포맷 했다가 복습차원에서 처음 부터 다시 하고 있습니다 근데 회원가입하기 부분에 있는 몽고DB카운터에서는 userNum을 1로 넣어놔서 1로 나오는데 몽고DB에 있는 유저 부분에서는 userNum자체가 안나오네요
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
이미지를 등록하면 axios err가 발생합니다
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 글만 등록하면 괜찮은데 이미지를 등록하면 err가 납니다. 크롬 콘솔창에서 뜨는 에러와 서버 콘솔창에서 뜨는 에러 모두 첨부하겠습니다 ㅠㅠ 어디서 문제가 생긴걸까요? 강사님 코드랑 꼼꼼하게 비교해봐도 잘 모르겠습니다. 네이버 클라우드와 연결하는 과정에 생긴 이슈같기도 하고.. 도와주세요. // 깃헙링크 해결돼서 깃헙링크 지웁니다!
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
깃헙 어디에 들어가면 참고 코드를 볼 수 있을까요?
깃헙 어디에 들어가면 참고 코드를 볼 수 있을까요?
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
MainPage 질문
우선 좋은 영상 감사합니다. 의미있는 경험이 되었던 것 같아요. 거의 다 만들었는데 정말 최종적으로 MainPage안에서 2가지 문제가 생겼습니다. 1. 마지막 게시물까지 확인해도 더보기가 사라지지 않습니다. 2. 새로고침을 하면 로그아웃은 되지 않으나 순간적으로 token을 읽지 못하고 useEffect에 의해 로그인 페이지로 이동하는 것 같습니다. MainPage.js import React, { useState, useEffect } from 'react' import axios from 'axios' import List from './Post/List' import '../Style/MainPage.css' import { useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; function MainPage() { const [sort, setSort] = useState("최신순") const [postList, setPostList] = useState([]) const [searchTerm, setSearchTerm] = useState("") const [skip, setSkip] = useState(0) const [loadMore, setLoadMore] = useState(true) const navigate = useNavigate() const user = useSelector(state=>state.user) useEffect(()=>{ console.log(user.accessToken) if(!user.accessToken){ alert("로그인된 회원만 이용할 수 있습니다.") navigate('/login') } console.log(user.accessToken) }, []) const getLoadMore = () => { let body = { sort: sort, searchTerm: searchTerm, skip: skip } axios.post('/api/post/list', body) .then(res => { if (res.data.success) { setPostList([...postList, ...res.data.postList]) setSkip(skip + res.data.postList.length) if (res.data.postList.lengh < 3) { setLoadMore(false) } } }).catch(err => { console.log(err) }) } const getPostList = () => { setSkip(0) let body = { sort: sort, searchTerm: searchTerm, skip: 0 } axios.post('/api/post/list', body) .then(res => { setPostList([...res.data.postList]) setSkip(res.data.postList.length) if (res.data.postList.lengh < 3) { setLoadMore(false) console.log(loadMore) } }).catch(err => { console.log(err) }) } useEffect(() => { getPostList() }, [sort]) const Search = (e) => { getPostList() } return ( <div> <div className='SearchAndArrange'> <button onClick={() => setSort("최신순")}>최신순</button> <button style={{ marginLeft: "5px", marginRight: "20px" }} onClick={() => setSort("인기순")}>인기순</button> <input style={{ marginRight: "5px" }} placeholder='제목 또는 내용' type="text" value={searchTerm} onChange={e => setSearchTerm(e.target.value)} /> <button onClick={(e) => Search(e)}>검색</button> <button style={{marginLeft: "10px"}} onClick={()=>navigate('/upload')}>게시글 작성</button> </div> <List postList={postList} /> {loadMore && (<button className='SeeMore' onClick={() => getLoadMore()}>더 보기</button>)} </div> ) } export default MainPage 서버쪽 post.js const express = require('express') const router = express.Router() const multer = require('multer') const { Post } = require('../models/post.js') const { Counter } = require('../models/counter.js') const { User } = require("../models/user") const { Router } = require('express') router.post('/submit', (req, res) => { //게시글 작성 기능 let temp = { title: req.body.title, content: req.body.content, image: req.body.image, } Counter.findOne({ name: 'counter' }).exec().then(counter => { temp.postNum = counter.postNum //counter의 게시물 번호를 지정해 줌. User.findOne({ uid: req.body.uid }).exec().then(userInfo => { //요청된 uid와 일치하는 user를 찾아서 temp.author = userInfo._id // 해당 user의 Id번호를 권한번호로 지정한 뒤 const CommunityPost = new Post(temp) //새로운 포스트모델을 생성하여 요청된 정보와 함께 넘겨줌. CommunityPost.save().then(() => { Counter.updateOne({ name: "counter" }, { $inc: { postNum: 1 } }) //counter의 게시물 번호를 1증가 .then(() => { res.status(200).json({ success: true }) }) }) }) }).catch(err => { err.status(400).json({ success: false }) }) }) router.post('/list', (req, res) => { let sort = {} if(req.body.sort ==="최신순"){ sort.createdAt = -1 }else{ sort.repleNum = -1 } Post.find({$or : [{title: {$regex: req.body.searchTerm}}, {content: {$regex: req.body.searchTerm}}]}) .populate("author") .sort(sort) .skip(req.body.skip) // .limit(3) .exec() .then(doc => { //populate는 주어진 정보를 통해 다른 document의 객체를 불러옴. 여기서는 author를 통해 user를 참조하여 Id를 가지고 옴. res.status(200).json({ success: true, postList: doc }) }).catch(err => { res.status(400).json({ success: false }) }) }) router.post('/detail', (req, res) => { Post.findOne({ postNum: Number(req.body.postNum) }).populate("author").exec() //요청된 게시물 번호가 일치하는 post를 찾음 .then(doc => { res.status(200).json({ success: true, post: doc }) //post라는 이름으로 해당 post 정보를 전송함. }).catch(err => { res.status(400).json({ success: false }) }) }) router.post('/edit', (req, res) => { console.log(req.body) let temp = { title: req.body.title, content: req.body.content, } Post.updateOne({ postNum: Number(req.body.postNum) }, { $set: temp }).exec() //게시물번호를 넘겨받아 해당 게시물을 temp로 업데이트 .then(() => { console.log("수정성공") res.status(200).json({ success: true }) }).catch(err => { console.log("수정실패") err.status(400).json({ success: false }) }) }) router.post('/delete', (req, res) => { Post.deleteOne({ postNum: Number(req.body.postNum) }).exec() //전달받은 게시물 번호를 찾아서 삭제해 줌. .then(doc => { res.status(200).json({ success: true }) }).catch(err => { console.log(err) res.status(400).json({ success: false }) }) }) const storage = multer.diskStorage({ //multer를 통해 전달받은 데이터를 파일 디스크에 저장 destination: (req, file, cb) => { //저장할 경로를 지정 cb(null, 'image') }, filename: (req, file, cb) => { //저장할 파일의 이름 지정 cb(null, Date.now() + '-' + file.originalname) } }) const upload = multer({ storage: storage }).single('image') router.post('/image/upload', (req, res) => { upload(req, res, (err) => { if (err) { res.status(400).json({ success: false }) } else { res.status(200).json({ success: true, filepath: req.file.path }) } }) }) module.exports = router
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
배포 시 에러 사항입니다ㅠㅠㅠ
안녕하세요 우선 너무 좋은 강의 감사합니다. 마지막강의까지 에러 없이 잘 따라오다가 배포 하려고 하니 이런 에러가 뜹니다ㅜㅜ index 파일을 못찾는것 같은데 어떻게 해결해야 할 지 모르겠어서 질문 남기겠습니다! 헤로쿠 에서 open app 클릭시 나타나는 화면과 heroku logs --tail 실행 결과입니다 PS C:\Users\wonyoung-Jang\Desktop\wonyoung\gwnu-m> heroku logs --tail » Warning: heroku update available from 7.53.0 to 7.60.2. 2022-05-25T10:40:03.449969+00:00 app[api]: Release v4 created by user zhak1230@gmail.com 2022-05-25T10:40:21.300566+00:00 app[api]: Set S3_SECRET config vars by user zhak1230@gmail.com 2022-05-25T10:40:21.300566+00:00 app[api]: Release v5 created by user zhak1230@gmail.com 2022-05-25T11:01:34.550638+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=gwnu-m.herokuapp.com request_id=cc7cbc5a-47f0-444f-87e6-b02300a69f52 fwd="59.29.213.146" dyno= connect= service= status=502 bytes= protocol=https 2022-05-25T11:01:34.939819+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=gwnu-m.herokuapp.com request_id=d087d9d7-2be1-4b46-bcc1-b53514075530 fwd="59.29.213.146" dyno= connect= service= status=502 bytes= protocol=https 2022-05-25T11:14:06.000000+00:00 app[api]: Build started by user zhak1230@gmail.com 2022-05-25T11:14:29.714046+00:00 app[api]: Deploy 7746a0b3 by user zhak1230@gmail.com 2022-05-25T11:14:29.714046+00:00 app[api]: Release v6 created by user zhak1230@gmail.com 2022-05-25T11:14:29.730747+00:00 app[api]: Scaled to web@1:Free by user zhak1230@gmail.com 2022-05-25T11:14:32.000000+00:00 app[api]: Build succeeded 2022-05-25T11:14:32.341696+00:00 heroku[web.1]: Starting process with command `node index.js` 2022-05-25T11:14:34.502746+00:00 heroku[web.1]: State changed from starting to up 2022-05-25T11:14:35.998399+00:00 app[web.1]: Example app listening at http://localhost:19002 2022-05-25T11:14:35.998434+00:00 app[web.1]: Connecting MongoDB... 2022-05-25T11:14:42.564092+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=49f5029d-7fa8-4253-8e4b-609ee8051f4b fwd="59.29.213.146" dyno=web.1 connect=0ms service=12ms status=404 bytes=380 protocol=https 2022-05-25T11:14:42.565472+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:15:04.956130+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=49ea607c-c789-4d6e-a27f-2993254684ef fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:15:04.958921+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:16:15.399122+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=57443219-b2be-41c3-a3a0-33a63bc479e0 fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:16:15.399764+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:17:55.404836+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:17:55.405190+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=86c91866-5a9b-4151-9f3a-dce3a913f11f fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:18:54.394793+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:18:54.395321+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=70932a05-4dca-4a37-a1d8-16d358f74a6c fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:21:24.930025+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:21:24.930161+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=4250b3f2-df7b-4410-a4e0-b3cfc6673a8f fwd="210.220.70.251" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:21:31.102464+00:00 heroku[router]: at=info method=GET path="/'" host=gwnu-m.herokuapp.com request_id=378cccd9-60e7-4862-baf1-b3248d901d2d fwd="210.220.73.248" dyno=web.1 connect=0ms service=5ms status=404 bytes=380 protocol=https 2022-05-25T11:21:31.102499+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:21:34.248268+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:21:34.248312+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=2bf35a5e-4d1e-41d3-8e54-f820672cfe91 fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:21:37.384383+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:21:37.384428+00:00 heroku[router]: at=info method=GET path="/'" host=gwnu-m.herokuapp.com request_id=dbb9162f-1baf-4d86-82bc-639185296f1e fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:23:23.380325+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:23:23.380928+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=d30d7f3c-4747-47dc-ba83-92ef152eee85 fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:27:42.308846+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=51928866-688f-4376-9600-55051be213fc fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:27:42.309004+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:27:50.326232+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:27:50.326430+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=a60768a0-e257-42cf-a676-468b6da786c8 fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:28:40.494014+00:00 heroku[router]: at=info method=GET path="/:1%20%20%20%20%20%20%20%20%20%20Failed%20to%20load%20resource:%20the%20server%20responded%20with%20a%20status%20of%20404%20(Not%20Found)" host=gwnu-m.herokuapp.com request_id=fd1040c9-c211-433b-96c2-ac74c799b42e fwd="59.29.213.146" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-25T11:28:40.494078+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:28:45.116261+00:00 heroku[router]: at=info method=GET path="/:1%20%20%20%20%20%20%20%20%20%20Failed%20to%20load%20resource:%20the%20server%20responded%20with%20a%20status%20of%20404%20(Not%20Found)" host=gwnu-m.herokuapp.com request_id=ac2c1832-c7ac-4541-a4a0-b8b1e89e78e4 fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:28:45.119362+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:31:22.787685+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=e60e8e7a-59aa-4d58-82e7-3d7e6e65bd36 fwd="59.29.213.146" dyno=web.1 connect=0ms service=6ms status=404 bytes=380 protocol=https 2022-05-25T11:31:22.788817+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:38:05.863742+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=7dbbbb19-f476-4909-963f-6820fa87c019 fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:38:05.864006+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T11:38:08.178834+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=bdf7a65b-2e56-433e-b0b7-d968afcb7cf0 fwd="59.29.213.146" dyno=web.1 connect=0ms service=1ms status=404 bytes=380 protocol=https 2022-05-25T11:38:08.179050+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-25T12:11:02.001392+00:00 heroku[web.1]: Idling 2022-05-25T12:11:02.003409+00:00 heroku[web.1]: State changed from up to down 2022-05-25T12:11:04.097332+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2022-05-25T12:11:04.263484+00:00 heroku[web.1]: Process exited with status 143 2022-05-28T03:35:39.590222+00:00 heroku[web.1]: Unidling 2022-05-28T03:35:39.608430+00:00 heroku[web.1]: State changed from down to starting 2022-05-28T03:35:42.465408+00:00 heroku[web.1]: Starting process with command `node index.js` 2022-05-28T03:35:44.847784+00:00 heroku[web.1]: State changed from starting to up 2022-05-28T03:35:45.663863+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T03:35:45.666654+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=d74caaaf-63b3-421f-a687-cf137bbff7a4 fwd="175.206.45.21" dyno=web.1 connect=0ms service=11ms status=404 bytes=380 protocol=https 2022-05-28T03:35:46.439587+00:00 app[web.1]: Example app listening at http://localhost:38170 2022-05-28T03:35:46.439623+00:00 app[web.1]: Connecting MongoDB... 2022-05-28T04:11:16.865535+00:00 heroku[web.1]: Idling 2022-05-28T04:11:16.868274+00:00 heroku[web.1]: State changed from up to down 2022-05-28T04:11:17.482816+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2022-05-28T04:11:17.716691+00:00 heroku[web.1]: Process exited with status 143 2022-05-28T09:09:16.690802+00:00 heroku[web.1]: Unidling 2022-05-28T09:09:16.704589+00:00 heroku[web.1]: State changed from down to starting 2022-05-28T09:09:19.340972+00:00 heroku[web.1]: Starting process with command `node index.js` 2022-05-28T09:09:21.556289+00:00 heroku[web.1]: State changed from starting to up 2022-05-28T09:09:22.761862+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T09:09:22.762023+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=e335df99-daef-48a6-a47a-2c0a4fb789ad fwd="118.44.0.20" dyno=web.1 connect=0ms service=7ms status=404 bytes=380 protocol=https 2022-05-28T09:09:22.828797+00:00 app[web.1]: Example app listening at http://localhost:19612 2022-05-28T09:09:22.828833+00:00 app[web.1]: Connecting MongoDB... 2022-05-28T09:11:03.832102+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=ff3517ff-6b45-4ca8-8faf-3b407bf97112 fwd="118.44.0.20" dyno=web.1 connect=0ms service=3ms status=404 bytes=380 protocol=https 2022-05-28T09:11:03.832898+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T09:11:06.680234+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=7d632159-983c-4456-af27-7d0c43d99708 fwd="118.44.0.20" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-28T09:11:06.680963+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T09:22:30.000000+00:00 app[api]: Build started by user zhak1230@gmail.com 2022-05-28T09:22:44.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/3ce16a9c-5aa5-4e7d-85ed-805cb9b1f9b8/activity/builds/adaa76cf-c678-42e1-bc8f-80b228bf5bf8 2022-05-28T09:23:05.554687+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=e756052d-15e7-4028-9c55-978964774ebd fwd="118.44.0.20" dyno=web.1 connect=0ms service=5ms status=404 bytes=380 protocol=https 2022-05-28T09:23:05.555060+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T09:25:19.314404+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html' 2022-05-28T09:25:19.315195+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=600d4b03-14b4-440d-8fc5-0c9c92fb8285 fwd="118.44.0.20" dyno=web.1 connect=0ms service=2ms status=404 bytes=380 protocol=https 2022-05-28T09:29:14.000000+00:00 app[api]: Build started by user zhak1230@gmail.com 2022-05-28T09:29:28.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/3ce16a9c-5aa5-4e7d-85ed-805cb9r directory, stat '/app/client/build/index.html' 2022-05-28T10:23:50.952592+00:00 heroku[router]: at=info method=GET path="/" host=gwnu-m.herokuapp.com request_id=9e77f2b9-39ca-498d-8add-c33620a0fb69 fwd="118.44.0.20" dyno=web.1 connect=0ms service=3ms status=404 bytes=380 protocol=https 2022-05-28T10:23:50.950585+00:00 app[web.1]: Error: ENOENT: no such file or directory, stat '/app/client/build/index.html'
- 미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
더보기 안없어짐
안녕하세요. 드디어 마지막 강의까지 듣게 되었습니다. 근데 마지막 문제가 생겼습니다.ㅠㅠ 게시물을 끝까지 다 보고나서 더보기 버튼이 안사라지는데 코드를 비교해보면 변수명 제외하고는 일치하는 것 같은데 이유를 잘 모르겠습니다.. 다른 기능은 잘 작동해요! import React, { useState, useEffect } from 'react' import axios from 'axios' import List from './Post/List' function MainPage() { const [sort, setSort] = useState("최신순") const [postList, setPostList] = useState([]) const [searchTerm, setSearchTerm] = useState("") const [skip, setSkip] = useState(0) const [loadMore, setLoadMore] = useState(true) const getLoadMore = ()=>{ let body = { sort : sort, searchTerm : searchTerm, skip : skip } axios.post('/api/post/list', body) .then(res=>{ if(res.data.success){ setPostList([...postList, ...res.data.postList]) setSkip(skip + res.data.postList.length) if (res.data.postList.lengh < 3){ setLoadMore(false) } } }).catch(err=>{ console.log(err) }) } const getPostList = ()=>{ setSkip(0) let body = { sort : sort, searchTerm : searchTerm, skip : 0 } axios.post('/api/post/list', body) .then(res=>{ setPostList([...res.data.postList]) setSkip(res.data.postList.length) if (res.data.postList.lengh < 3){ setLoadMore(false) } if (res.data.postList.length == 0) { setLoadMore(false); } }).catch(err=>{ console.log(err) }) } useEffect(()=>{ getPostList() }, [sort]) const Search = (e)=>{ getPostList() } return ( <div> <button onClick={()=>setSort("최신순")}>최신순</button> <button onClick={()=>setSort("인기순")}>인기순</button> <input type="text" value={searchTerm} onChange={e=>setSearchTerm(e.target.value)}/> <button onClick={(e)=>Search(e)}>검색</button> <List postList={postList}/> {loadMore && <button onClick={()=>getLoadMore()}>더 보기</button>} </div> ) } export default MainPage