Home > Enterprise >  Error while creating JSON server in react
Error while creating JSON server in react

Time:07-15

I'm new to react and wanted to setup a JSON server for my project. I executed the below commands :

  1. npm install -g json-server
  2. json-server -watch src/users.json

But, it was not successful and I received the below log. Can you tell me how to proceed further for this.

 \{^_^}/ hi!

Loading –watch
Error: Unsupported source –watch

CodePudding user response:

You should use regular hyphens for passing command line options:

json-server --watch src/users.json
  • Related