0

I'm working in Angular 2 and if I have a compiler error when I do an npm start I see it right away. The problem I'm running into is when I am doing live code edits and I introduce a an error. I'm not seeing any compiler errors in the lite-server output so I have to stop and do another npm start to figure out what's wrong.

Is this just the way things are or is there a way to see errors when working this way?

[Update]

The scripts section of my package.json

  "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"
  },
Shane Courtrille
  • 13,960
  • 22
  • 76
  • 113
  • Can't you see compile error(s) in `node.js command prompt`? – micronyks Sep 18 '16 at 15:12
  • If not, Can you show me your `packag.json` file? – micronyks Sep 18 '16 at 15:13
  • My command prompt gets replaced by the lite-server output. – Shane Courtrille Sep 18 '16 at 15:37
  • `concurrently` is designed to concatenate all outputs and prefix them. Your package.json looks like it's from the Angular 2 Quickstart, which uses SystemJS and Angular2 in development mode. A lot of HTTP requests are made that way upon every live refresh (and, ofc, logged by lite-server). Maybe your terminal scrollback isn't large enough, so you don't see the compiler errors? Have you tried muting lite-server by doing something like `npm run lite > /dev/null`? – Georg Grab Sep 18 '16 at 15:52
  • I've added it @micronyks Thanks – Shane Courtrille Sep 18 '16 at 15:53
  • Another thing you could try is to only show the output of the first parameter `npm run tsc:w` by doing `npm start | grep "\[0\]"` instead of `npm start` – Georg Grab Sep 18 '16 at 15:56
  • Ahh thanks @talkdirty I see it now when I scroll back back. Sadly I'm on Windows 7 without the new bash stuff so I can't /dev/null. I'll look into how I can mute lite-server in other ways.. – Shane Courtrille Sep 18 '16 at 15:57

0 Answers0