簡體   English   中英

npm開始同時在tsc &&上給出錯誤

[英]npm start giving errors on tsc && concurrently

我一直在嘗試運行npm start,但不斷出現以下錯誤...

19 error node v4.2.0
20 error npm  v3.10.5
21 error code ELIFECYCLE
22 error resume-editor@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
22 error Exit status 1
23 error Failed at the resume-editor@1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the resume-editor package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     tsc && concurrently "npm run tsc:w" "npm run lite"
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs resume-editor
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls resume-editor
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

我嘗試了以下操作:npm install tsc(和最新版本)npm install --save鍵入內容類型安裝npm同時安裝npm install npm運行類型npm run tsc(這里有錯誤)

npm似乎什么都沒有開始工作。 更令人困惑的是,直到我退出並嘗試運行node server.js之前,一切都運行良好。 然后,一旦我嘗試切換回npm start,從那以后我就一直遇到這些錯誤。

Package.json:

{
  "name": "resume-editor",
  "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.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/core": "2.0.0-rc.4",
    "@angular/forms": "0.2.0",
    "@angular/http": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/router": "3.0.0-beta.1",
    "@angular/router-deprecated": "2.0.0-rc.2",
    "@angular/upgrade": "2.0.0-rc.4",
    "angular2-in-memory-web-api": "0.0.14",
    "body-parser": "^1.4.3",
    "bootstrap": "^3.3.6",
    "concurrently": "^2.2.0",
    "core-js": "^2.4.0",
    "express": "^4.13.4",
    "method-override": "^2.1.3",
    "mongoose": "^4.4.12",
    "morgan": "^1.1.1",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "systemjs": "0.19.27",
    "tsc": "^1.20150623.0",
    "typescript": "^1.8.10",
    "typings": "^1.3.2",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.2.0",
    "typescript": "^1.8.10",
    "typings": "^1.0.4"
  }
}

PS:我擁有node和npm的最新版本。

您已經安裝了一個名為TSC的軟件包,它可能與打字稿軟件包tsc的命令行沖突。 嘗試卸載TSC軟件包並重新運行

您需要全局安裝typescript

npm install -g typescript

確保項目根目錄的路徑中沒有空格。 重命名祖先目錄,使其沒有空格。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM