M121-chapter 4 - Unable to import companies.json file

Hi!! I’m unable to import companies.json file with the following command:

mongoimport --db startups --collection companies–file companies.json

It throws the error as:

SyntaxError: unexpected token: identifier :

Tried couple of times to save the file to the local desktop with the right path but got the same error. Anyone please help ?

Thanks in Advance

Hi @Deepthi_94508,

Few points to consider here:

  1. Make sure mongod instance is up and running.
  2. You should run this command from the folder where companies.json file exists.
  3. Be mindful of copy/pasting mongoimport command, it is better if you type it.

If the problem still persists for you, please share the screenshot of the command you run and the error message.

Please let me know, if you have any questions.