File doesn't Exist - loadMovieDetailsDataset.js

Hello,

I am not able to laod the loadMovieDetailsDataset.js through shell. Got an Error: error laoding js file and also displayed doesn’t exist.

Can some one help please ?

Thanks,
Govin

Hi @govindaraj_74339, let’s see how you’re doing it.

MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
admin 0.000GB
local 4.902GB
MongoDB Enterprise Cluster0-shard-0:PRIMARY> laod(“loadMovieDetailsDataset”)
2019-11-11T14:45:41.505-0500 E QUERY [js] uncaught exception: ReferenceError: laod is not defined :
@(shell):1:1
MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“laodMovieDetailsDataset.js”)
2019-11-11T14:46:23.484-0500 E - [js] file [laodMovieDetailsDataset.js] doesn’t exist
2019-11-11T14:46:23.485-0500 E QUERY [js] Error: error loading js file: laodMovieDetailsDataset.js :
@(shell):1:1
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
admin 0.000GB
local 4.902GB
MongoDB Enterprise Cluster0-shard-0:PRIMARY> cd local
2019-11-11T14:50:54.799-0500 E QUERY [js] uncaught exception: SyntaxError: unexpected token: identifier :
@(shell):1:3
MongoDB Enterprise Cluster0-shard-0:PRIMARY>

In both cases you have typos. Plus make sure you’re pointing to the folder where the file is contained.

You cannot do that, it is shell command, not mongo shell command.
Also as you did typo with LOAD command before you did the same typo with LAOD file. The error is pretty clear the file does not exits - so wrong path or typo typo typo (or potentionally privilegies)

Thank you guys. I am able to load the file.

Hi @govindaraj_74339,

I’m glad your issue got resolved. If you have any other query then please feel free to get back to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer