2016-09-07 4 views
5

angular2-universalのメンテナは自分のサイト更新していない:サイトのドキュメントが古くなったときにAngular2 Universalをインストールするには?

問題1)

typings install node express body-parser serve-static express-serve-static-core mime --ambient 
typings ERR! deprecated The "ambient" flag is deprecated. Please use "global" instead 

問題2)

typings install node express body-parser serve-static express-serve-static-core mime --global 
typings INFO globaldependencies "express" lists global dependencies on "node" that must be installed manually 
typings INFO globaldependencies "body-parser" lists global dependencies on "node" that must be installed manually 
typings ERR! message Unable to find "node" ("npm") in the registry. 
typings ERR! message However, we found "node" for 2 other sources: "dt" and "env" 
typings ERR! message You can install these using the "source" option. 
typings ERR! message We could use your help adding these typings to the registry: https://github.com/typings/registry 
typings ERR! caused by https://api.typings.org/entries/npm/node/versions/latest responded with 404, expected it to equal 200 

typings ERR! cwd /Users/davidmontgomery/Documents/frontend/green 
typings ERR! system Darwin 15.6.0 
typings ERR! command "/usr/local/bin/node" "/usr/local/bin/typings" "install" "node" "express" "body-parser" "serve-static" "express-serve-static-core" "mime" "--global" 
typings ERR! node -v v4.5.0 
typings ERR! typings -v 1.3.3 

typings ERR! If you need help, you may report this error at: 
typings ERR! <https://github.com/typings/typings/issues> 

にはどうすれば解決できますか?私はマックを使用しています。

+0

Hey!あなたの質問に正しい答えを選択することを忘れないでください;-) –

答えて

0

バージョン1.0以降、タイプスクリプト定義マネージャは、--ambientフラグの非推奨を含むいくつかの更新([ここ]参照[1])を行いました。周囲の

  • 用途は今typings.jsonどのambientDependenciesに意味
    • globalDependenciesを名前を変更する必要があるグローバルであり、すべてのambientDevDependenciesは がglobalDevDependenciesと名前を変更する必要があります。
    • また

=>詳細については、これをチェック... --ambientは今--global であることを意味します。 [タイピングgithubの]:https://github.com/typings/typings [元の答え]:Ambient flag is deprecated

あなたが必要な場合はこのように、あなたは、)↓

typings install dt~PackageName --save --global

元以下typings install dt~body-parser --global --save

コメントをこのパターンを使用する必要がありますもっと助けてください。

0

typescriptと普遍的なチームは、最新の角度rc5とrc6のリリースに普遍的にアップデートするために作業しています。 すぐに使い始めるには、普遍的なスターターキットhttps://github.com/angular/universal-starterをチェックアウトしてください。

15

解決策は、グローバルにインストールする必要がある唯一のものであるため、--globalフラグを使用してノードを個別にインストールすることです。

typings install dt~node --global 
typings install dt~express dt~body-parser dt~serve-static dt~express-serve-static-core dt~mime 

EDIT: それは今角度コアの一部であるとして、あなたは、もはや、サーバ側のレンダリングのための普遍的な角度の必要はありません。

関連する問題