Inflearn brand logo image

Inflearn Community Q&A

jjohye110185's profile image
jjohye110185

asked

Node and React series that you can learn by following - Basic lecture

Node React Basics Lecture #3 Mongo DB Connection

MongoParseError: options usecreateindex, usefindandmodify are not supported

Written on

·

578

17

mongoose 6 버전을 사용하시는 분들은 강사님의 설명과 다르게 해야 해서 공유드립니다!


수정전

mongoose
.connect(URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
useFindAndModify: false,
})
.then(() => console.log('MongoDB Connected...'))
.catch((e) => console.log('MongoDB error: ', e));





수정후

mongoose
.connect(URI)
.then(() => console.log('MongoDB Connected...'))
.catch((e) => console.log('MongoDB error: ', e));



참고한 글: 스택오버플로우 바로가기

nodejsreact

Answer 3

0

 오~ 감사해요

0

감사합니다. 

0

이렇게 입력해줘도 괜찮을까요 ?

mongoose.connect(URI,
{
useNewUrlParser : true,
useUnifiedTopology : true,
})
.then(()=> console.log(`MongoDB connected`))
.catch(err => console.log(err))

jjohye110185's profile image
jjohye110185

asked

Ask a question