node:67376) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:67376) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/operations/execute_operation.js:70
callback(err, result);
^
TypeError: Cannot read property 'map' of undefined
at /Users/wuweichao/codes/nodeconf/node_modules/mongoose/lib/model.js:3315:58
at executeCallback (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/operations/execute_operation.js:70:5)
at bulkWriteOperation.execute (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/operations/insert_many.js:42:23)
at bulk.execute (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/operations/bulk_write.js:70:16)
at err (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/utils.js:385:14)
at executeCallback (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/utils.js:375:25)
at handleCallback (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/utils.js:102:55)
at resultHandler (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/bulk/common.js:503:14)
at handler (/Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/core/topologies/mongos.js:916:14)
at /Users/wuweichao/codes/nodeconf/node_modules/mongodb/lib/core/connection/pool.js:405:18
at process._tickCallback (internal/process/next_tick.js:61:11)
Waiting for the debugger to disconnect...
Process exited with code 1
If the current behavior is a bug, please provide the steps to reproduce.
I cannot give you a brief repo to reproduce. But I have some screenshot when debugging mongoose's codes with following stackoverflow question :(
mongoose not authorized on admin to exec is not a mongo CRUD error, it's appear when I try to write to collection. I think it's a bug personally your don't figure on.
If it's expected behavior, it's must be my fault.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
cannot read map of undefined
If the current behavior is a bug, please provide the steps to reproduce. I cannot give you a brief repo to reproduce. But I have some screenshot when debugging mongoose's codes with following stackoverflow question :(
https://stackoverflow.com/questions/23943651/mongodb-admin-user-not-authorized
The mongo database which I currently used is company based, so I can't provide it
The following condition is false, so there no
writeErrors
exists inerror
which cause
TypeError: Cannot read property 'map' of undefined
finally and my nodejs app crashed.What is the expected behavior?
I found that you commit file change. https://github.com/Automattic/mongoose/commit/b5c52117841edfe956656a4ed62d1d7b39d771ef
mongoose not authorized on admin to exec
is not a mongo CRUD error, it's appear when I try to write to collection. I think it's a bug personally your don't figure on.If it's expected behavior, it's must be my fault.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.