Error in starting node project
UnhandledPromiseRejectionWarning: MongoError: not authorized on elm to execute command { insert: “hongbaos”, ordered: false, $db: “elm” }
The reason is that you do not have permission to connect to the database
The reason is that the database mongo.conf There is an auth = true solution
1. Comment out auth = true
2. Enter adimn to set the user name and password, and use the user name and password to access the database
Switch use admin before creating user
db.createUser(
{
user:"root",
pwd:"123456",
roles:[{role:"root",db:"admin"}]
}
);
Read More:
- UnhandledPromiseRejectionWarning Error: Can‘t set headers after they are sent (How to Fix)
- Error running ‘SpringCloudStarter‘: Command line is too long. Shorten comman
- (node:268660) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘yallist‘
- Failed to execute ‘getComputedStyle’ on ‘Window’: parameter 1 is not of type ‘Element’.
- WeChat official account web page authorized, redirect_ Uri parameter error, solution!
- Failed to execute goal on project XXXX-api: Could not resolve dependencies for pro
- VUEJS Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of
- Using code to create control objects, set the event listening method does not execute
- Uncaught TypeError: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node How to Fix
- Quarz timing task does not execute and does not report error
- Uncaught TypeError: Failed to execute ‘removeChild’ on ‘Node’: parameter 1 is not of type ‘Node’.
- java.lang.IllegalStateException: Could not execute method for android:onClick
- Wamp Apache can’t run error report could not execute menu item
- Install wampserver and prompt could not execute menu item internal error
- How to execute Makefile
- Failed to execute / bin / bash: resource temporarily unavailable
- Failed to execute goal
- Slim error “failed to execute login command”
- Springbatch failed to execute commandlinerunner