Почему json-server выдает json-server: command not found?

MacBook-Pro-Aleksandr:Food_dist-2 aleksandr$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help json` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (food_dist-2) 
version: (1.0.0) 
description: 
git repository: 
keywords: 
author: 
license: (ISC) 
About to write to /Applications/MAMP/htdocs/Food_dist-2/package.json:

{
  "name": "food_dist-2",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "json-server": "^0.16.1"
  },
  "dependencies": {},
  "description": ""
}


Is this OK? (yes) y
MacBook-Pro-Aleksandr:Food_dist-2 aleksandr$ npm i json-server --save-dev
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
updated 2 packages and audited 234 packages in 5.208s

1 package is looking for funding
  run `npm fund` for details

found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
MacBook-Pro-Aleksandr:Food_dist-2 aleksandr$ json-server db.json
bash: json-server: command not found
MacBook-Pro-Aleksandr:Food_dist-2 aleksandr$ 

Ответы (0 шт):