2016-05-19 6 views
0

https://angular.io/guide/quickstartの手順に従い、npm installコマンドを使用して対応するクイックスタートファイルとインストールされた依存関係を作成しました。その後、npm startコマンドを発行すると、次のエラーが発生します。npm startでアプリを起動できません

npm ERR! Linux 3.13.0-32-generic 
npm ERR! argv "node" "/usr/local/bin/npm" "start" 
npm ERR! node v0.10.25 
npm ERR! npm v3.9.0 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `tsc && concurrently "npm run tsc:w" "npm run lite" ` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular2-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc && concurrently "npm run tsc:w" "npm run lite" 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular2-quickstart 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular2-quickstart 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/sobin/AngularTuts/heroappbase/npm-debug.log 
+0

'npm run tsc'を実行できますか? 'npm install'はエラーを返しましたか?これが最後に起こったのは、許可の問題があり、tscを含めてインストールされていないものがたくさんありました。 –

答えて

1

まず、私は、コマンドプロンプトで次のコマンドを実行してみました:働い

concurrently "npm run tsc:w" "npm run lite" 

を。 npm startが正常に働いていた、その時点で

"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ", 

:これにより

"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", 

:次に、package.jsonファイルで、私はこの行を置き換えます。希望が役立ちます。

0

自分のドキュメントによると、angular2が自分siteから少なくともnode 5.x.x

が必要です。

を使用すると、ノード-vを実行することにより、少なくともノードv5.xxとNPMの3.xxのを実行していることを確認し、ターミナル/コンソールウィンドウのnpm -v古いバージョンではエラーが発生します。

node v0.10.25のように表示されます。アップグレードを試みてください。

アップグレードするには、バージョン間で簡単に切り替えることができるnvmを使用できます。 GitHubのnvm

関連する問題