작성한 질문수
[리뉴얼] React로 NodeBird SNS 만들기
프론트 서버 배포하기
작성
·
351
0
npm i 설치
npm run build
npm pm2 start -- npm start 하면
정상적으로 작동하지만
npm pm2 monit 하면
저 에러가 발생합니다.
답변 1
에러 메시지를 잘라서 올려주셨습니다.
npx pm2 logs --err --lines 100 했을 경우
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm |
0|npm | npm ERR! A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_20_983Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_24_351Z-debug.log
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_27_630Z-debug.log
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_31_734Z-debug.log
0|npm | npm
0|npm | ERR! code ELIFECYCLE
0|npm | ERR!
0|npm | A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_43_565Z-debug.log
0|npm | code
0|npm | ELIFECYCLE
0|npm | ERR! errno 1
0|npm | react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_54_345Z-debug.log
명령어 앞에 sudo 붙여서 실행하세요
npx pm2 logs --err --lines 100 했을 경우
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm |
0|npm | npm ERR! A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_20_983Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm |
0|npm | npm ERR! A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_24_351Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm |
0|npm | npm ERR! A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_27_630Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm |
0|npm | npm ERR! A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_31_734Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm
0|npm | ERR! code ELIFECYCLE
0|npm | npm ERR! errno 1
0|npm | npm ERR! react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm | npm
0|npm |
0|npm | ERR!
0|npm | A complete log of this run can be found in:
0|npm | npm ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_43_565Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm
0|npm |
0|npm | ERR!
0|npm |
0|npm | code
0|npm | ELIFECYCLE
0|npm | npm
0|npm | ERR! errno 1
0|npm | npm
0|npm |
0|npm | ERR!
0|npm | react-next@0.1.0 start: `cross-env NODE_ENV=production next start -p 80`
0|npm | npm ERR! Exit status 1
0|npm | npm ERR!
0|npm | npm ERR! Failed at the react-next@0.1.0 start script.
0|npm | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
0|npm | npm
0|npm |
0|npm | ERR!
0|npm | A complete log of this run can be found in:
0|npm | npm
0|npm |
0|npm | ERR! /home/ubuntu/.npm/_logs/2022-02-07T00_25_54_345Z-debug.log
0|npm | { Error: listen EACCES: permission denied 0.0.0.0:80
0|npm | at Server.setupListenHandle [as _listen2] (net.js:1263:19)
0|npm | at listenInCluster (net.js:1328:12)
0|npm | at Server.listen (net.js:1415:7)
0|npm | at Promise (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:2:62)
0|npm | at new Promise (<anonymous>)
0|npm | at start (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/server/lib/start-server.js:1:431)
0|npm | at nextStart (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/cli/next-start.js:19:125)
0|npm | at commands.(anonymous function).then.exec (/home/ubuntu/react-nodebird-aws/front/node_modules/next/dist/bin/next:26:341)
0|npm | at process._tickCallback (internal/process/next_tick.js:68:7)
0|npm | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|npm | code: 'EACCES',
0|npm | errno: 'EACCES',
0|npm | syscall: 'listen',
0|npm | address: '0.0.0.0',
0|npm | port: 80 }
0|npm | npm
0|npm |
0|npm | ERR!