db.moviesScratch.InsertOne is not a function

db.moviesScratch.InsertOne is not a function


The functions start with a lower case letter, so this should be db.moviesScratch.insertOne (with small i in insert).

Hope this helps :slight_smile:

use camel case for function start with a small letter and follow letter should start with capital.


  1. Please post the output/error in the context you’re executing (i.e. a screenshot of mongoshell).

  2. If the example you provided is accurate, you need to format it as a function with arguments (i.e db.moviesScratch.insertOne(…), even functions with no or optional arguments must specify empty braces like this.


Otherwise MongoShell won’t treat it as a function call, etc…