Javascript 当我运行nodemon服务器时,我得到一个错误";错误的身份验证失败。[nodemon]应用程序崩溃-在启动之前等待文件更改…”;

Javascript 当我运行nodemon服务器时,我得到一个错误";错误的身份验证失败。[nodemon]应用程序崩溃-在启动之前等待文件更改…”;,javascript,node.js,mongodb,port,nodemon,Javascript,Node.js,Mongodb,Port,Nodemon,我一直在开发node.js/react应用程序,并将其上传到heroku。大约一个月前,它(在本地和heroku)起了作用。现在没有了。当我运行nodemon服务器时,我似乎也会遇到同样的错误,即使我下载了应用程序的旧提交(确实有效)。终端执行以下操作: TDI-MacBook-Air:udemy-MERN-FromGithub bob$ nodemon server [nodemon] 1.19.0 [nodemon] to restart at any time, enter `rs` [n

我一直在开发node.js/react应用程序,并将其上传到heroku。大约一个月前,它(在本地和heroku)起了作用。现在没有了。当我运行nodemon服务器时,我似乎也会遇到同样的错误,即使我下载了应用程序的旧提交(确实有效)。终端执行以下操作:

TDI-MacBook-Air:udemy-MERN-FromGithub bob$ nodemon server
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
Server started on Port 5000
bad auth Authentication failed.
[nodemon] app crashed - waiting for file changes before starting...
1.从我的githum下载了一个旧提交

2。在终端运行:
npm安装

3.在终端
nodemon服务器上运行(得到与以前相同的错误)

4。我尝试用postman连接mongo数据库,但出现以下错误:

Could not get any response
There was an error connecting to http://localhost:5000/api/posts.
Why this might have happened:
The server couldn't send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General
读取错误后,我将SSL证书验证更改为off,但它没有解决问题

有相当多的代码-不确定什么是最有用的文件-但它确实工作了一个月前

完整代码如下:

如果你想要特定的代码,请告诉我,我会发布它

希望服务器运行。错误是

TDI-MacBook-Air:udemy-MERN-FromGithub bob$ nodemon server
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
Server started on Port 5000
bad auth Authentication failed.
[nodemon] app crashed - waiting for file changes before starting...

在/config/default.json或/config/production.json中有一个对象mongoURI

将url替换为用户密码和用户名而不是当前有效的帐户名和帐户密码

您可能已删除该用户或更改了密码

我还试着在我的本地机器上启动,它没有任何问题


在/config/default.json或/config/production.json中,有一个对象mongoURI

将url替换为用户密码和用户名而不是当前有效的帐户名和帐户密码

您可能已删除该用户或更改了密码

我还试着在我的本地机器上启动,它没有任何问题


我认为这是mongodb的错误。你能检查一下用户名和密码是否正确吗?我想这是mongodb的错误。你能检查一下用户名和密码是否正确吗?谢谢!绝对的救命稻草-我一定是在为生产准备代码的时候覆盖了该代码。谢谢!绝对的救命稻草-我一定是在为生产准备代码的时候覆盖了该代码。