hasan-py / MERN_Stack_Project_Ecommerce_Hayroo

E-commerce Website | Payment gateway | Reactjs | Nodejs | Mongodb | Expressjs | JWT | Tailwind Css
https://www.youtube.com/watch?v=lXk14qt2D28
750 stars 375 forks source link

MongoError: E11000 duplicate key error collection: amazona.products index: name_1 dup key: { name: null } #8

Closed shaw12 closed 3 years ago

shaw12 commented 3 years ago

I am getting this error when I am trying to add product second time through admin panel.

MongoError: E11000 duplicate key error collection: amazona.products index: name_1 dup key: { name: null } at Function.create (D:\a_project\project\server\node_modules\mongodb\lib\core\error.js:57:12)
at toError (D:\a_project\project\server\node_modules\mongodb\lib\utils.js:130:22) at D:\a_project\project\server\node_modules\mongodb\lib\operations\common_functions.js:258:39
at handler (D:\a_project\project\server\node_modules\mongodb\lib\core\sdam\topology.js:943:24)
at D:\a_project\project\server\node_modules\mongodb\lib\cmap\connection_pool.js:350:13 at handleOperationResult (D:\a_project\project\server\node_modules\mongodb\lib\core\sdam\server.js:558:5) at MessageStream.messageHandler (D:\a_project\project\server\node_modules\mongodb\lib\cmap\connection.js:281:5) at MessageStream.emit (events.js:376:20)
at processIncomingData (D:\a_project\project\server\node_modules\mongodb\lib\cmap\message_stream.js:144:12) at MessageStream._write (D:\a_project\project\server\node_modules\mongodb\lib\cmap\message_stream.js:42:5) at writeOrBuffer (internal/streams/writable.js:358:12) at MessageStream.Writable.write (internal/streams/writable.js:303:10) at TLSSocket.ondata (internal/streams/readable.js:745:22) at TLSSocket.emit (events.js:376:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) { driver: true, index: 0, code: 11000, keyPattern: { name: 1 }, keyValue: { name: null } }

miidlaj commented 2 years ago

have you found the solution ??

Seyramize commented 2 years ago

No

On Mon, 11 Jul 2022, 07:53 midlaj4466, @.***> wrote:

have you found the solution ??

— Reply to this email directly, view it on GitHub https://github.com/hasan-py/MERN_Stack_Project_Ecommerce_Hayroo/issues/8#issuecomment-1180079250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWTQQYF352BIB6WKUVKHKTVTPHGNANCNFSM5BM23QFA . You are receiving this because you are subscribed to this thread.Message ID: <hasan-py/MERN_Stack_Project_Ecommerce_Hayroo/issues/8/1180079250@ github.com>