❗ 에러상황
mongoose.connect("mongodb://localhost:27017/go-camp", {
useNewUrlParser: true,
useCreateIndex: true,
useUnifiedTopology: true,
});
에러발생.
✅ 해결방안
No More Deprecation Warning Options useNewUrlParser, useUnifiedTopology, useFindAndModify, and useCreateIndex are no longer supported options. Mongoose 6 always behaves as if useNewUrlParser, useUnifiedTopology, and useCreateIndex are true, and useFindAndModify is false. Please remove these options from your code. |
몽구스 공식문서를 보니 버전6부터 해당 옵션을 사용하지 않아도 되는 것같다. 그래서 지워주니 잘 작동하였다.
'ERRORS' 카테고리의 다른 글
[error] `Warning: validateDOMNesting(...):... (0) | 2023.08.16 |
---|---|
[error] CRA 리액트 웹팩 버전이 안 맞는 경우의 에러 (0) | 2023.07.16 |
[error] npm ERR! code 1 오류 (0) | 2023.07.16 |
[error] Uncaught (in promise) TypeError 오류 (0) | 2023.06.19 |
[error] 리액트 img 태그 버그 해결 (0) | 2023.02.13 |