inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

nodemon ./bin/www 입력 시 오류

미해결

코로나맵 개발자와 함께하는 지도서비스 만들기 1

PS C:\Users\jjoob\myfirstmap\myfirstmap> nodemon ./bin/www [nodemon] 3.1.7 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,cjs,json [nodemon] starting node ./bin/www node:internal/modules/cjs/loader:1252 throw err; ^ Error: Cannot find module 'morgan' Require stack: - C:\Users\jjoob\myfirstmap\myfirstmap\app.js - C:\Users\jjoob\myfirstmap\myfirstmap\bin\www at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function._load (node:internal/modules/cjs/loader:1075:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Module.require (node:internal/modules/cjs/loader:1340:12) at require (node:internal/modules/helpers:141:16) at Object.<anonymous> (C:\Users\jjoob\myfirstmap\myfirstmap\app.js:5:14) at Module._compile (node:internal/modules/cjs/loader:1546:14) at Object..js (node:internal/modules/cjs/loader:1689:10) at Module.load (node:internal/modules/cjs/loader:1318:32) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\\Users\\jjoob\\myfirstmap\\myfirstmap\\app.js', 'C:\\Users\\jjoob\\myfirstmap\\myfirstmap\\bin\\www' ] } Node.js v22.11.0 [nodemon] app crashed - waiting for file changes before starting... PS C:\Users\jjoob\myfirstmap\myfirstmap> 다 지우고 처음부터 다시 실행해봐도 계속 같은 오류이고 localhost:3000 실행하면 흠… 이 페이지에 연결할 수 없습니다. localhost 이(가) 연결을 거부했습니다. 이렇게 나오네요 ㅠ (nodemon ./bin/www 입력 시 오류)

  • node.js
  • 웹앱
  • express
  • vscode
  • nodemon
  • localhost
ykoh0421 댓글 1 좋아요 0 조회수 195

nodemon관련 에러 npm run start가 안되요 sql연동이 안되는 것 같습니다. m1 맥북

미해결

\안녕하세요. 제가 윈도우 환경에서는 모두 완벽히 설치하여 잘 사용하였는데 맥북 m1으로 컴퓨터를 바꾸고 다시 해보려하니까 새롭게 설치도 다시하고 했는데 안되네요,,, 이유를 잘 모르겠어서 질문 남깁니다... 정말 맥북사고 쓰지도 못하고 골치가 아파요.. 한번만 도와주세요 뭐가 문제 일까요?? 이후 다시 새롭게 만들어 해봤더니 sql이 연동이 되지 않고 있는 것 같습니다. sql연동 전에는 npm run start가 되네요

  • npmrunstart
  • node.js
  • 맥북m1
  • nodemon
IAN 댓글 0 좋아요 0 조회수 346

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

미해결

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

[이유는 모르겠지만.. 회사 업무 시스템을 꺼서 그런지 해결되었습니다. 정상적으로 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
InjunLim 댓글 1 좋아요 0 조회수 523

8강 [nodemon] restarting due to chages가 뜨지 않을 때

미해결

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

8강 시청중에 노드몬 부분에서 index.js의 내용을 변경하였는데도 [nodemon] restarting due to chages가 뜨지 않았습니다. 이러한 문제는 일부 네트워크의 환경 문제라고 합니다. 이를 해결하기 위해서는 index.js의 scripts의 backend 부분을 저렇게 작성해주는 것입니다. 그러면 정상적으로 작동하게 됩니다. 혹시나 같은 문제로 고민하는 분이 있으시면 도움이 됐으면 좋겠습니다. John Ahn 님 덕분에 좋은 퀄리티의 수업 잘 듣고 있습니다. 감사합니다. 출처: https://stackoverflow.com/questions/37622606/nodejs-nodemon-not-restarting-my-server

  • nodemon
  • nodejs
  • react
dongwookim.dev 댓글 1 좋아요 1 조회수 434

인기 태그

인프런 TOP Writers

주간 인기글