• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

시작 페이지가 안출력되요

20.01.07 20:36 작성 조회수 3.32k

0

C:\hyun-tube\boilerplate-mern-stack>npm run dev

> react-boiler-plate@1.0.0 dev C:\hyun-tube\boilerplate-mern-stack

> concurrently "npm run backend" "npm run start --prefix client"

[0]

[0] > react-boiler-plate@1.0.0 backend C:\hyun-tube\boilerplate-mern-stack

[0] > nodemon server/index.js

[0]

[1]

[1] > client@0.1.0 start C:\hyun-tube\boilerplate-mern-stack\client

[1] > react-scripts start

[1]

[1] 'react-scripts'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ�

[1] ��ġ ������ �ƴմϴ�.

[1] npm ERR! code ELIFECYCLE

[1] npm ERR! errno 1

[1] npm ERR! client@0.1.0 start: `react-scripts start`

[1] npm ERR! Exit status 1

[1] npm ERR!

[1] npm ERR! Failed at the client@0.1.0 start script.

[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

[1] npm WARN Local package.json exists, but node_modules missing, did you mean to install?

[1]

[1] npm ERR! A complete log of this run can be found in:

[1] npm ERR!     C:\Users\hyunsepk\AppData\Roaming\npm-cache\_logs\2020-01-07T11_31_13_080Z-debug.log

[1] npm run start --prefix client exited with code 1

[0] [nodemon] 1.19.2

[0] [nodemon] to restart at any time, enter `rs`

[0] [nodemon] watching dir(s): *.*

[0] [nodemon] starting `node server/index.js`

[0] Server Running at 5000

[0] (node:15384) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

[0] MongoDB Connected...

이상태에서 localhost:5000 으로 요청을 날렸는데 

canot get/ 이라고 출력되요 왜 그런지 알려주시면 감사여 

답변 3

·

답변을 작성해보세요.

2

안녕하세요 ^^  

이렇게 에러가 나는 이유는  

Dependency ( 필요한 라이브러리들 )를 다운받지 않았을때 나오는 에러입니다. 

npm WARN Local package.json exists, but node_modules missing, did you mean to install?

이 로그 보이시죠 ?   

Dependency를 다운 받으면 node_modules속으로 저장이 됩니다. 근데 현재 

node_modules이 없을거에요 ! 

해결방법은   

 1. root 디렉토리에서   npm install     이렇게 한번 하셔서   node 서버를 위한 dependencies 를 다운받구요.

2. cd client  에서   디렉토리를 client 로 옮긴후에   npm install  하셔서  react 를 위한 dependencies를 다운 받으시면 됩니다. ^^  

이렇게 하면 저 에러는 사라질것이구요  혹시 MongoDB 연결은 하셨나요 ~ ? 

0

아 다행이네요 ~ 다음에 또 막히시면 질문주세요 ~~ !

0

terecal님의 프로필

terecal

질문자

2020.01.07

front 에서 npm install 하고 나서 루트에서 npm run dev하니까 실행되여 감사합니다 ~!