Angular2:Autocompiler观察器无法处理文件更改

时间:2016-06-16 21:59:18

标签: angular

我正在关注Angular2的快速入门指南。我已经能够使用'tsc'命令将我的打字稿文件成功编译为js。 但是,当我使用'tsc -w'命令启动观察者时,观察者不会检测到任何文件更改。 在控制台中我经常看到这一行:

  

11:56:25 PM - 编译完成。注意文件更改。

没有任何错误或警告信息。

我正在使用基于mac os的vagrant(scotchbox):Ubuntu 14.04.3 LTS(GNU / Linux 3.13.0-55-generic x86_64)

Nodejs版本:v6.2.1

Npm版本:3.9.3

任何人都可以帮助我吗?

这是我的package.json的内容:

{
  "name": "angular",
  "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.2",
    "@angular/compiler":  "2.0.0-rc.2",
    "@angular/core":  "2.0.0-rc.2",
    "@angular/http":  "2.0.0-rc.2",
    "@angular/platform-browser":  "2.0.0-rc.2",
    "@angular/platform-browser-dynamic":  "2.0.0-rc.2",
    "@angular/router":  "2.0.0-rc.2",
    "@angular/router-deprecated":  "2.0.0-rc.2",
    "@angular/upgrade":  "2.0.0-rc.2",
    "systemjs": "0.19.27",
    "core-js": "^2.4.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12",
    "angular2-in-memory-web-api": "0.0.12",
    "bootstrap": "^3.3.6"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.2.0",
    "typescript": "^1.8.10",
    "typings":"^1.0.4"
  }
}
UPD:我已经在我的mac os上安装了nodejs,而不是在vagrant box上,并且watcher工作正常。但虚拟机上的观察者面临同样的问题。

0 个答案:

没有答案