Angular2:并发不被识别为内部或外部命令

当使用npm start运行server2 for angular2时出现错误,说明并发不能被识别为内部或外部命令,为什么会发生这种types的错误

这里是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" } } 

项目的结构是有node_module和typings文件夹有服务器的app.ts文件(只有空的express被导入)和component.ts(和他们的.js),tsconfig.json

并发不被识别为内部或外部命令

您可能还没有运行npm install因为您添加了"concurrently": "^1.0.0"依赖项。

live-server不被识别为外部或内部命令

您正在安装lite-server

"lite-server": "^1.3.1"

但是你正在调用live-server

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

请改用lite-server