인프런 커뮤니티 질문&답변

작성자 없음

작성자 정보가 삭제된 글입니다.

따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]

cannot get 에러

작성

·

406

0

선생님 안녕하세요! 두번째 강의 듣고있는데 포트 5000으로 접속 시 cannot get 에러가 나와서 질문 드립니다.ㅜㅜ
도움 부탁드립니다
 
PS C:\Users\user\Downloads\boilerplate-mern-stack-master (2)\boilerplate-mern-stack-master> npm run dev > react-boiler-plate@1.0.0 dev > concurrently "npm run backend" "npm run start --prefix client" [0] [0] > react-boiler-plate@1.0.0 backend [0] > nodemon server/index.js [0] [1] [1] > client@0.1.0 start [1] > react-scripts start [1] [1] 'react-scripts'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α׷�, �Ǵ� [1] ��ġ ������ �ƴմϴ�. [1] npm run start --prefix client exited with code 1 [0] [nodemon] 1.19.4 [0] [nodemon] to restart at any time, enter `rs` [0] [nodemon] watching dir(s): *.* [0] [nodemon] watching extensions: js,mjs,json [0] [nodemon] starting `node server/index.js` [0] (node:23504) Warning: Accessing non-existent property 'count' of module exports inside circular dependency [0] (Use `node --trace-warnings ...` to show where the warning was created) [0] (node:23504) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency [0] (node:23504) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency [0] (node:23504) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency [0] Server Listening on 5000 [0] MongoDB Connected...
 
 

 

답변 1

0

John Ahn님의 프로필 이미지
John Ahn
지식공유자

안녕하세요  

현재 백엔드 서버는 에러는 안나오는데 경고가 나오는것 같습니다. 
그 부분은 몽고 DB 쪽 경고인데 

mongoose.connect(config.mongoURI, {
useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: false
}).then(() => console.log('MongoDB Connected...'))
.catch(err => console.log(err))

이부분을

mongoose.connect(config.mongoURI)
.then(() => console.log('MongoDB Connected...'))
.catch(err => console.log(err))

이렇게 바꿔주세요 ~ 

클라이언트 부분은 에러가 난 것같은데 혹시 모듈은 다 설치가 됐나요 ~ ?!

네 교수님 하라하신 대로 client랑 server측 npm install 했는데, localhost:5000 접속 시 cannot get / 에러가 없어지질 않네요 ..ㅜㅜ

 

PS C:\Users\user\Downloads\boilerplate-mern-stack-master (2)\boilerplate-mern-stack-master> npm run dev

 

> react-boiler-plate@1.0.0 dev

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

 

[0] 

[0] > react-boiler-plate@1.0.0 backend

[0] > nodemon server/index.js

[0]

[1] 

[1] > client@0.1.0 start

[1] > react-scripts start

[1]

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

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

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

[0] [nodemon] 1.19.4

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

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

[0] [nodemon] watching extensions: js,mjs,json

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

[0] (node:21428) Warning: Accessing non-existent property 'count' of module exports inside circular dependency

[0] (Use `node --trace-warnings ...` to show where the warning was created)

[0] (node:21428) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency

[0] (node:21428) Warning: Accessing non-existent property 'remove' of module exports inside circular 

dependency

[0] (node:21428) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

[0] (node:21428) DeprecationWarning: current URL string parser is deprecated, and will be removed in 

a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.

[0] Server Listening on 5000

[0] (node:21428) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

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

 

 

작성자 없음

작성자 정보가 삭제된 글입니다.

질문하기