lite-server: help...i cant run angular2 quickstart

i cant run angular2 quickstart, it cant run lite-server

C:\angularjs\angular2-tour-of-heroes\app>npm start

angular2-quickstart@1.0.0 start C:\angularjs\angular2-tour-of-heroes tsc && concurrently “npm run tsc:w” “npm run lite”

app/app.component.ts(77,13): error TS2304: Cannot find name ‘HEROES’. app/app.component.ts(80,3): error TS2393: Duplicate function implementation. app/app.component.ts(84,34): error TS2339: Property ‘then’ does not exist on type ‘void’. app/app.component.ts(89,3): error TS2393: Duplicate function implementation.

npm ERR! Windows_NT 10.0.10586 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “start” npm ERR! node v6.2.1 npm ERR! npm v3.9.3 npm ERR! code ELIFECYCLE npm ERR! angular2-quickstart@1.0.0 start: tsc && concurrently "npm run tsc:w" "npm run lite" npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular2-quickstart@1.0.0 start script 'tsc && concurrently “npm run tsc:w” “npm run lite” '. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the angular2-quickstart package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! tsc && concurrently “npm run tsc:w” “npm run lite” npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular2-quickstart npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls angular2-quickstart npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\angularjs\angular2-tour-of-heroes\app\npm-debug.log

About this issue

Most upvoted comments

try changing “start”: "tsc && concurrently "npm run tsc:w" "npm run lite" " to: “start”: "concurrently "npm run tsc:w" "npm run lite" " in your package.json file. Worked for me

This is nodejs problem - not lite-server. Try to reinstall all packages by deleting node_modules folder and then run command ‘npm install’

I had same issue

node @ v6.9.4

Package.json

 "scripts": {
    "clean": "rimraf app/**/*.js app/**/*.js.map",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "prestart": "npm run clean",
    "start": "tsc && concurrently \"tsc -w\" \"lite-server\" "
  },
  "dependencies": {
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/core": "2.0.0",
    "@angular/forms": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/router": "3.0.0",
    "systemjs": "0.19.27",
    "core-js": "2.4.1",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.23"
  },
  "devDependencies": {
    "@types/core-js": "0.9.34",
    "@types/node": "6.0.41",
    "concurrently": "2.2.0",
    "lite-server": "2.2.2",
    "rimraf": "2.5.4",
    "typescript": "2.0.2"
  }

I followed below things. Got fixed. 👍

please make sure that you have installed "npm install concurrently " and “npm insatll lite-server”. I also missed dependencies on “devDependencies”.

Laureian, thank you for your answer. But I use empty folder and I tryed to install packages several times. The resut is the same.