Json-server: Command not found

Created on 27 Sep 2016  路  6Comments  路  Source: typicode/json-server

I tried to run command _json-server db.json_ in my iMac.
But getting _json-server command not found_. It works in some other machine.
Please help me out on how to resolve it.

Most helpful comment

@Pradeepkn Did you try sudo npm install -g json-server.
executing this as sudo solved issue for me (ubuntu 14.04, node installed without nvm)

All 6 comments

@Pradeepkn Did you try sudo npm install -g json-server.
executing this as sudo solved issue for me (ubuntu 14.04, node installed without nvm)

This fixed my problem, thanks!

I tried to install json server in window 10 But I am getting this message.
Installation command which i am using $ npm install -g json-server

Error Message : '$' is not recognized as an internal or external command,
operable program or batch file.

@munimathur, you don't need to type the $. ;)

Helps for me (may be problem with global path on iMac)
export PATH=$PATH:$HOME/.npm-global/bin

Was this page helpful?
0 / 5 - 0 ratings