작성
·
175
0
영상 순서대로 npm install 두번하고 dev.js 만들고 몽고디비 연결해주고 visual 터미널에서 npm run dev하니깐 localhost://3000으로 뜨더니! 로그인도 안했는데 오른쪽 navbar에 logout 만 있어더라구요?? 그리고 터미널 창 보니깐
밑에 처럼 떠서... 그리고 logout 버튼도 안눌리고.. 음 로그인 회원가입도 안되는거 같던데.. 도와주세요 ㅠㅠ
PS C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master> npm run dev
> react-boiler-plate@1.0.0 dev C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master
> concurrently "npm run backend" "npm run start --prefix client"
[0]
[0] > react-boiler-plate@1.0.0 backend C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master
[0] > nodemon server/index.js
[0]
[1]
[1] > client@0.1.0 start C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client
[1] > react-scripts start
[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:18440) 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] Server Listening on 5000
[0] (node:18440) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
[0] (node:18440) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
[0] (node:18440) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
[1] [HPM] Proxy created: / -> http://localhost:5000
[1] i 「wds」: Project is running at http://172.30.1.13/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Browserslist: caniuse-lite is outdated. Please run:
[1] npx browserslist@latest --update-db
[1] Compiled with warnings.
[1]
[1] ./src/components/views/LoginPage/LoginPage.js
[1] Line 74:11: 'dirty' is assigned a value but never used no-unused-vars
[1] Line 79:11: 'handleReset' is assigned a value but never used no-unused-vars
[1]
[1] ./src/components/views/RegisterPage/RegisterPage.js
[1] Line 92:11: 'dirty' is assigned a value but never used no-unused-vars
[1] Line 97:11: 'handleReset' is assigned a value but never used no-unused-vars
[1]
[1] Search for the keywords to learn more about each warning.
[1] To ignore, add // eslint-disable-next-line to the line before.
[1]
[0] MongooseError [MongooseServerSelectionError]: connection <monitor> to 34.202.38.84:27017 closed
[0] at new MongooseServerSelectionError (C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\node_modules\mongoose\lib\error\serverSelection.js:22:11)
[0] at NativeConnection.Connection.openUri (C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\node_modules\mongoose\lib\connection.js:823:32)
[0] at Mongoose.connect (C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\node_modules\mongoose\lib\index.js:333:15)
[0] at Object.<anonymous> (C:\Users\shin1\OneDrive\바탕 화면\boilerplate-mern-stack-master\server\index.js:18:26)
[0] at Module._compile (internal/modules/cjs/loader.js:1063:30)
[0] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
[0] at Module.load (internal/modules/cjs/loader.js:928:32)
[0] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[0] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
[0] at internal/main/run_main_module.js:17:47 {
[0] reason: TopologyDescription {
[0] type: 'ReplicaSetNoPrimary',
[0] setName: null,
[0] maxSetVersion: null,
[0] maxElectionId: null,
[0] servers: Map(3) {
[0] 'youtubeclone-shard-00-01.nvpjz.mongodb.net:27017' => [ServerDescription],
[0] 'youtubeclone-shard-00-02.nvpjz.mongodb.net:27017' => [ServerDescription],
[0] 'youtubeclone-shard-00-00.nvpjz.mongodb.net:27017' => [ServerDescription]
[0] },
[0] stale: false,
[0] compatible: true,
[0] compatibilityError: null,
[0] logicalSessionTimeoutMinutes: null,
[0] heartbeatFrequencyMS: 10000,
[0] localThresholdMS: 15,
[0] commonWireVersion: null
[0] },
[0] [Symbol(mongoErrorContextSymbol)]: {}
[0] }
답변 1
0
안녕하세요 !!! 아래 에러로그에 보니깐
[0] MongooseError [MongooseServerSelectionError]: connection <monitor> to 34.202.38.84:27017 closed
이렇게 몽고 디비가 연결 오류가 난걸 볼수가있습니다 ~
우선 몽고디비 연결부분을 해결해주셔야 합니다 ~ mongoURI부분을 정확히 입력했는지 확인해주세요 ~!
아니면 방화벽 whitelist가 현재사용하고 있는곳에서 열려있는지 확인해주세요 !
감사합니다!! 알고보니 몽고디비 홈페이지에서 Networt Access 의 아이피주소를 0.0.0.0/0 새로등록해서 활성화시키니 잘 접속이 되네용~ 강의 잘 듣고 있습니다. 감사합니다.