Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular2 : concurrent is not recognized as internal or external command

While running server for angular2 using npm start is giving error that concurrent is not recognized as internal or external command, why is it happens these kind of error

here is package.json:

{
  "name": "contactlistapp",
  "version": "1.0.0",
  "description": "The app",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "tsc": "./node_modules/.bin/tsc",
    "tsc:w": "./node_modules/.bin/tsc -w",
    "serve": "./node_modules/.bin/live-server --host=localhost --port=3000 .",
    "start": "concurrent \"npm run tsc:w\" \"npm run serve\" "
  },
  "author": "Sarah",
  "license": "ISC",
  "dependencies": {
    "express": "^4.13.3",
    "angular2": "2.0.0-beta.0",
    "systemjs": "0.19.6",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.0",
    "zone.js": "0.5.10"
  },
  "devDependencies": {
    "concurrently": "^1.0.0",
    "lite-server": "^1.3.1",
    "typescript": "^1.7.3"
  }
}

structure of the project is there is node_module and typings folder there is app.ts file for server(empty only express is imported), and component.ts(and their .js), tsconfig.json

like image 976
blackHawk Avatar asked Jan 16 '16 20:01

blackHawk


1 Answers

concurrent is not recognized as internal or external command

Must likely you haven't ran npm install since you added the "concurrently": "^1.0.0" dependency.

live-server is not recognized as external or internal command

You are installing the lite-server :

"lite-server": "^1.3.1"

yet you are calling the live-server:

"serve": "./node_modules/.bin/live-server --host=localhost --port=3000 ."

call lite-server instead.

like image 124
Langley Avatar answered Nov 07 '22 16:11

Langley