Hi everyone, I am 梅巴哥er
.
Today early in the morning, ready to open the project to continue to code, the results suddenly being given: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
.
The error code is roughly like this:
(Explain, the picture is used by this blogger . Thank you for the blogger’s hint, otherwise I don’t know the problem. Because it was handled all at once, I didn’t have time to take a screenshot of my own error report. , The error is the same as his,
so I borrowed the picture) This makes me confused. I have been fine all the time. Why did I suddenly report the error? ! !
Then I checked on Baidu and found that it was mongodb服务关闭了
.
Find the reason, then it will be easier.
启动任务管理器 → 找到Mongodb → 右击 → 选择“开始”
That's it.
As shown in the figure:
Then open it again cmd
and enter the command to npm start
open the background service.
-----------------------end--------------------------