Robert
Robert

Reputation: 333

Angular 2 QuickStart on Linux not working

I'm setting up Angular 2 Quick Start Tutorial from scratch on a virtualbox Linux machine build. I've followed all the instructions as part of the 5 minute quick start but when I get to the "npm start" I get this error:

/media/sf_testdev/angular-quickstart$ npm start

> [email protected] start /media/sf_testdev/angular-quickstart
> tsc && concurrently "npm run tsc:w" "npm run lite" 

sh: 1: concurrently: not found

npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.7.0
npm ERR! npm  v3.10.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] 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 angular-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 angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /media/sf_testdev/angular-quickstart/npm-debug.log

Here is my current package.json file

{
  "name": "angular-quickstart",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common": "2.0.0-rc.6",
    "@angular/compiler": "2.0.0-rc.6",
    "@angular/compiler-cli": "0.6.0",
    "@angular/core": "2.0.0-rc.6",
    "@angular/forms": "2.0.0-rc.6",
    "@angular/http": "2.0.0-rc.6",
    "@angular/platform-browser": "2.0.0-rc.6",
    "@angular/platform-browser-dynamic": "2.0.0-rc.6",
    "@angular/router": "3.0.0-rc.2",
    "@angular/upgrade": "2.0.0-rc.6",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.11",
    "systemjs": "0.19.27",
    "zone.js": "^0.6.17",
    "angular2-in-memory-web-api": "0.0.18",
    "bootstrap": "^3.3.6"
  },
  "devDependencies": {
    "concurrently": "^2.2.0",
    "lite-server": "^2.2.2",
    "typescript": "^1.8.10",
    "typings":"^1.3.2"
  }
}

Nothing I have tried online seems to work to fix. thanks for the help in advance!

Upvotes: 0

Views: 721

Answers (3)

Deoxyseia
Deoxyseia

Reputation: 1387

Sorry I did dont see all the log, concurrently: not found is because concurrently module isn't install, deleting node_modules folder and executing:

npm install

Or installing specifically concurrently with:

npm install -g concurrently

Upvotes: 0

Deoxyseia
Deoxyseia

Reputation: 1387

  • That's because tsc command finds errors in the code. If you execute only tsc in terminal can you see the errors and fix it.

  • If you only run the app remove tsc && in start line, finally this is as:

    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\",

    to

    "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",

With it works.

Upvotes: 0

Eddie Martinez
Eddie Martinez

Reputation: 13910

It seems the error is when it tries to run the command concurrently

sh: 1: concurrently: not found

you have to run npm install first to install the dependencies and then you will have concurrently, and everything should work fine.

Upvotes: 1

Related Questions