npm run build似乎不起作用

时间:2017-02-17 15:53:20

标签: node.js npm package.json

我在终端上运行npm run build但脚本没有执行。它只是运行但没有做任何事情。

附加我的 package.json

{
  "name": "angular2-starter",
  "version": "0.1.0",
  "scripts":{
      "build":"tsc --rootDir src --outDir dist"
  },
  "dependencies": {
    "@angular/common": "2.4.7",
    "@angular/compiler": "2.4.7",
    "@angular/core": "2.4.7",
    "@angular/forms": "2.4.7",
    "@angular/http": "2.4.7",
    "@angular/platform-browser": "2.4.7",
    "@angular/platform-browser-dynamic": "2.4.7",
    "@angular/router": "3.4.7",
    "core-js": "2.4.1",
    "reflect-metadata": "0.1.9",
    "rxjs": "5.1.1",
    "zone.js": "0.7.7"
  },
  "devDependencies": {
    "typescript": "^2.1.5",
    "typings": "^2.1.0"
  }
}

这就是我正在运行的内容:

$ npm run build

> angular2-starter@0.1.0 build C:\Users\user\desktop\angular2-starter
> tsc --rootDir src --outDir dist

尝试检查`npm build` doesn't run the script named "build" in package.json但无法解决错误。

请告诉我,我在这里做错了什么。

0 个答案:

没有答案