Creating Documents: insertOne()

I cannot insert a new document in Compass. I am following along with the video but when I type the information into the insert box for video.moviesScratch it tells me “Insert not permitted while document contains errors.” Can someone help me please and thank you?

It would help if you share the document you try to insert because as the error indicates the document contains errors.

… and besides the syntax error, I wonder if you’re trying to insert into the read-only Class cluster “cluster0-shard-00-00-jxeqq”?

Hi @Jackee_60553,

As others have mentioned, most likely you have a syntax error in the document that you are trying to insert. Please share the document that you are trying to insert.

Shubham Ranjan
Curriculum Services Engineer

I am having the same problem on Windows and Mac and nothing seems to working. I keep getting “Insert not permitted while document contains errors”.

The left side of the image is the tutorial I am trying to follow and the right side is what I am trying to create. Can someone please tell me where I am going wrong?

Enclose each field name in quotes and the error will go away.

The lecture is a bit out of sync with the latest version of Compass.

Thank you for your reply. I just figured it out

Closing this thread as the issue has been resolved.