인프런 커뮤니티 질문&답변
aws front 서버 문제
작성
·
357
0
안녕하세요!
섹션 6 프런트 서버 배포하기 과정중에 문제가 있어서 질문 올립니다.
포트도 잘 바꾸었고, 백엔드 서버는 잘 돌아가는데 프런트 서버가 돌아가지 않습니다.
문제가 무엇인지 모르겠네요 ㅠㅠ
front에서 sudo npx pm2 monit을 하면 다음과 같이 Mem 부분이 이상한 문자로 뜨는데 이유를 모르겠습니다. 에러 로그 또한 뜨지 않아서 무슨 문제인지 정말 모르겠네요 ㅜㅜ
백서버는 다음과 같이 잘 뜨는것을 확인할 수 있습니다.

프런트 서버에 연결하면 다음과 같이 크롬에서 에러를 보여줍니다.

답변 1
0
이원영
질문자
네! package.json이 있는 프런트 내에서 실행했습니다..! 프런트에서 build도 했습니다!
이와 같이 명령어를 실행하였고 위와 같은 에러가 발생했습니다..ㅜㅜ
json파일입니다.
package.json
{
"name": "react-nodebird-front",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next -p 3060",
"build": "cross-env ANALYZE=true NODE_ENV=production next build",
"start": "cross-env NODE_ENV=production next start -p 80"
},
"author": "wonyoung",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@faker-js/faker": "^7.4.0",
"@next/bundle-analyzer": "^12.3.1",
"antd": "^4.22.3",
"axios": "^0.27.2",
"babel-plugin-styled-components": "^2.0.7",
"cross-env": "^7.0.3",
"immer": "^9.0.15",
"moment": "^2.29.4",
"next": "^9.5.5",
"next-redux-wrapper": "^6.0.2",
"pm2": "^5.2.2",
"prop-types": "^15.8.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-redux": "^8.0.2",
"react-slick": "^0.29.0",
"redux": "^4.2.0",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.1.3",
"shortid": "^2.2.16",
"styled-components": "^5.3.5",
"swr": "^1.3.0"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^8.21.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"faker": "^5.5.3",
"nodemon": "^2.0.4",
"webpack": "^4.43.0"
}
}






sudo npx pm2 start npm -- start && sudo npx pm2 monit 명령어를 쳤더니 다음과 같이 뜹니다!