2017-03-12 33 views
0

我試圖用這個命令來運行Visual Studio代碼的應用程序: 「故宮開始」建設Angular2 - 打字稿在Visual Studio代碼

但我收到此錯誤:

npm ERR! Windows_NT 6.3.9600 
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v0.12.2 
npm ERR! npm v2.7.4 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `concurrently "npm run build:watch" "npm run serve"` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'concurrently "npm run build:watch" "npm run serve"'. 
npm ERR! 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!  concurrently "npm run build:watch" "npm run serve" 
npm ERR! 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!  C:\Users\user\Desktop\angular-tour-of-heroes\npm-debug.log 

我做這些步驟:

  1. 混帳克隆https://github.com/angular/quickstart.git快速入門
  2. CD快速入門
  3. NPM安裝
  4. NPM啓動

,並在第4步 失敗,我該怎麼解決呢?

+0

使用'ng serve'確保你已經安裝了角度cli – Habeeb

回答

0

如果你想建新角2應用,我的建議是使用的Angular Cli代替快速入門

安裝角CLI中,創建&啓動應用程序後,在3個步驟簡單:

ng new my-app 
cd my-app 
ng serve 
0

你需要更新您的節點和NPM的版本。

從下面的鏈接:

檢驗是否正在運行節點運行至少節點v4.x.x和NPM 3.x.x -v和NPM -v在終端/控制檯窗口。 舊版本會產生錯誤。

Quickstart Prerequisites

這些是您當前正在運行的版本,根據從控制檯輸出。

npm ERR! node v0.12.2 
npm ERR! npm v2.7.4