inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

노드 리액트 기초 강의 #8 Nodemon 설치

[이유를 모르겠는데 해결되었습니다] [nodemon] Could not shutdown sub process cleanly

512

InjunLim

작성한 질문수 1

0

[이유는 모르겠지만.. 회사 업무 시스템을 꺼서 그런지 해결되었습니다. 정상적으로 restart 됩니다. 감사합니다]
 
안녕하세요, 강사님 강의 감사히 잘 듣고있습니다.
 
Nodemon 설치 중에는 전혀 문제가 없었는데,
구글링 해도 나오지 않는 문제가 있어 질문드립니다.
 
구동까지 잘 되고, 기능상 문제가 없습니다.
그런데, 소스를 수정 후 저장버튼을 누르면
[nodemon] restarting due to changes... [nodemon] Could not shutdown sub process cleanly
이런 메세지가 발생합니다.
별것 다 해본 것 같은데 해결법을 찾지 못했습니다 ㅠㅠ 도와주실 수 있을까요?
 
 
아래 터미널과 index.js, package.json 소스 공유드립니다.
 
 
D:\GitHub\react\boiler-plate>npm run backend > boiler-plate@1.0.0 backend D:\GitHub\react\boiler-plate > nodemon index.js [nodemon] 2.0.14 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,json [nodemon] starting `node index.js` Example app listening at http://localhost:5000 MongoDB Connected... [nodemon] restarting due to changes... [nodemon] Could not shutdown sub process cleanly [nodemon] restarting due to changes... [nodemon] Could not shutdown sub process cleanly
 
 
packages.json 파일은 이것저것 시도해보다 devDependencies에서 dependencies로 옮겨가게 되었습니다. (dev 태그를 빼고 설치해봤습니다..)
 
packages.json
{
  "name": "boiler-plate",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "backend": "nodemon index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "injun",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.0",
    "express": "^4.17.1",
    "mongoose": "^6.0.12",
    "nodemon": "^2.0.14"
  },
  "devDependencies": {}
}
 
 
idnex.js
const express = require('express');
const app = express();
const port = 5000;

const bodyParser =  require('body-parser');
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());


const {User} = require("./models/User");

const mongoose = require('mongoose');
mongoose.connect('@@@',{
   
}).then(() => console.log('MongoDB Connected...'))
.catch(err => console.log(err));


app.get('/', (req, res) => {
  res.send('Hello World!2100000');
});

app.post('/register', (req, res) => {

  // 회원가입할 때 필요한 정보들을 client에서 가져오면
  // 그것들을 데이터베이스에 넣어준다.
  const user = new User(req.body);

  user.save((err, doc) => {
    if(err) return res.json({ success: false, err})
    return res.status(200).json({
      success: true
    })
  });



});

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
});

nodemon nodejs react

답변 1

0

John Ahn

안녕하세요 !!! 

이 부분은 제가 처음 본 에러이며, 에러 로그를 이용해서 구글링해봐도 답변이 전혀 없네요 ㅠㅠ 
소스 코드로 인한 에러가 아닌 컴퓨터 자체와 nodemon을 사용할 때 충돌이 나는것 같은데 
만약 에러가 계속 난다면 우선 nodemon을 이용하지 않고 우선 node index.js를 이용해주시겠어요?!!

깃 이메일이랑 비번이 필요하다고 하네요

0

35

1

404 에러

0

102

1

34강 인증 체크에서 element 사용 때문에 에러나시는 분들 이렇게 하심 됩니다.

0

119

1

로그인, 로그아웃, 토근 작동 안 함

0

239

0

9강 오류 어떻게 해결하나요?

0

194

1

localhost 에서 연결을 거부했습니다.

0

1927

4

포스트맨에서 true가 안떠요

0

150

1

왜 안되나요

0

129

1

몽고db 연결 오류가 납니다 위에껀 입력한 코드, 아래껀 터미널이에요

0

243

1

로그아웃 401 에러(Unauthorized)

0

504

2

암호가 해싱되지 않고 입력값 그대로 db에 저장되는 문제

0

149

1

7강중에서

0

162

2

User.findByToken is not a function

0

211

1

루트 디렉토리

0

270

1

useState

0

560

1

프록시 잘 설정했는데도 404 오류 뜨는 분들

5

875

6

webpack 관련 에러 질문

0

219

1

리액트 관련 질문

0

272

1

14강 로그아웃 안됨

0

318

1

mongoDB 데이터 확인하는 법

0

408

1

postman 에러

0

291

1

선생님 리덕스를 사용하면 어떠한 부분이 좋은지 알 수 있을까요?

0

234

1

다음과 같은 에러들이 발생합니다.

0

273

1

14강 로그아웃 기능 구현시 postman에서 Cannot POST 오류가 뜹니다.

0

379

1