2016-12-16 4 views
1

角度クイックスタートプロジェクトはhttps://angular.io/docs/ts/latest/guide/setup.htmlからダウンロードしました。サンプルは私のLinuxマシンでは起動しません。 node.jsおよびnpmはREADME.mdファイルに従って指定されたバージョンレベルにあります。私はnode.jsをローカルのホームディレクトリにインストールし、それを自分のパスに追加しました。私はnpmをインストールしてサーバ時間を稼ぎ、同じ結果を得ました。補足として、私はMACにクイックスタートプロジェクトをインストールして実行することができました。角度クイックスタートが開始されません

npm start 

> [email protected] start /home/mydir/quickstart-master 
> tsc && concurrently "tsc -w" "lite-server" 

[0] tsc: Command not found. 
[0] tsc -w exited with code 1 
[1] lite-server: Command not found. 
[1] lite-server exited with code 1 

npm ERR! Linux 2.6.32-642.6.2.el6.x86_64 
npm ERR! argv "/home/mydir/node-v6.9.2-linux-x64/bin/node" "/home/mydir/node-v6.9.2-linux-x64/bin/npm" "start" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `tsc && concurrently "tsc -w" "lite-server" ` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '. 
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 angular-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc && concurrently "tsc -w" "lite-server" 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, 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!  /home/mydir/quickstart-master/npm-debug.log 

OK、私は提案し、コマンド実行:

ここでは出力がありますNPM I TSC LITE-サーバーを、今、このエラーを取得しています:

npm start 

> [email protected] start /home/mydir/quickstart-master 
> tsc && concurrently "tsc -w" "lite-server" 

error TS5023: Unknown compiler option 'moduleResolution'. 
error TS5023: Unknown compiler option 'lib'. 

npm ERR! Linux 2.6.32-642.6.2.el6.x86_64 
npm ERR! argv "/home/mydir/node-v6.9.2-linux-x64/bin/node" "/home/mydir/node-v6.9.2-linux-x64/bin/npm" "start" 
npm ERR! node v6.9.2 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `tsc && concurrently "tsc -w" "lite-server" ` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '. 
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 angular-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc && concurrently "tsc -w" "lite-server" 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, 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!  /home/mydir/quickstart-master/npm-debug.log 

答えて

0

あなたはtscを持っていませんおよびlite-serverがインストールされており、package.jsonの依存関係の下には表示されません。

実行

npm i tsc lite-server 

次にpackage.jsonファイルに "スタート" スクリプトを変更してみてくださいもう一度

0

をアプリを起動。

から:

"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", 

へ:

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

そして。

これはなぜ必要なのかわかりませんが、この問題も発生しました。何らかの理由で4月に変更されたようです:diff for package.json

関連する問題