`NPM

2016-05-26 14 views
0

Iやったステップ角の案内バイステップ:`NPM

[email protected] MINGW64 ~/Documents/angular2 
$ npm install 

> [email protected] postinstall C:\Users\morwin\Documents\angular2 
> typings install 

typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/node/tags/4.0.0%2B20160509154515" 
typings ERR! caused by unable to verify the first certificate 

typings ERR! cwd C:\Users\morwin\Documents\angular2 
typings ERR! system Windows_NT 6.1.7601 
typings ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\morwin\\Documents\\angular2\\node_modules\\typings\\dist\\bin.js" "install" 
typings ERR! node -v v6.1.0 
typings ERR! typings -v 0.8.1 
typings ERR! code EUNAVAILABLE 

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

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: [email protected] 
npm WARN [email protected] No description 
npm WARN [email protected] No repository field. 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v6.1.0 
npm ERR! npm v3.8.6 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `typings install` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'typings install'. 
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 package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  typings install 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular2 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular2 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\morwin\Documents\angular2\npm-debug.log 

https://angular.io/guide/quickstart

そして私は、私はこのエラーを取得するnpm install

のステップになったときだから私は続行しようとしましたnpm start

そして、私は得る:

[email protected] MINGW64 ~/Documents/angular2 
$ npm start 

> [email protected] start C:\Users\morwin\Documents\angular2 
> tsc && concurrently "npm run tsc:w" "npm run lite" 

node_modules/@angular/core/src/application_ref.d.ts(39,88): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(99,42): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/application_ref.d.ts(174,33): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(26,16): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/di/reflective_provider.d.ts(105,123): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/di/reflective_provider.d.ts(105,165): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'. 
node_modules/@angular/core/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'. 
node_modules/@angular/core/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/component_resolver.d.ts(8,53): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/component_resolver.d.ts(12,44): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(62,148): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(103,144): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(108,139): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(109,135): error TS2304: Cannot find name 'Promise'. 
node_modules/@angular/core/src/reflection/reflector.d.ts(28,22): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/reflection/reflector.d.ts(30,15): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/reflection/reflector.d.ts(32,15): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/reflection/reflector.d.ts(34,15): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/core/src/reflection/reflector.d.ts(36,16): error TS2304: Cannot find name 'Set'. 
node_modules/@angular/core/src/testability/testability.d.ts(40,20): error TS2304: Cannot find name 'Map'. 
node_modules/@angular/platform-browser-dynamic/platform_browser_dynamic.d.ts(75,90): error TS2304: Cannot find name 'Promise'. 
node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promise'. 
node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promise'. 
node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promise'. 

npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 
npm ERR! node v6.1.0 
npm ERR! npm v3.8.6 
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 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 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular2 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\morwin\Documents\angular2\npm-debug.log 

これを機能させるにはどうすればよいですか?

git clone ./my-angular-app https://github.com/angular/quickstart 

は最も完全な、と便利です。例:

+0

npmが入力パッケージの証明書を拒否しているようです。他のすべてのエラーは、入力が欠落していることに続きます。厳密な証明書検証を無効にするには、これを実行してください: 'npm config set strict-ssl false'を実行してから、もう一度 'npm install'を実行してみてください。 – awiseman

+0

ありがとうございます。私はこのエラーが発生します:https://gist.github.com/morwin10/d430b0f3c7513b2b7aee47fce11a77bd –

+0

あなたはpackage.jsonを投稿できますか? – awiseman

答えて

2

C:\Users\morwinユーザーディレクトリ内のファイル名.typingsrcを作成する - ためにたとえば含ま

{ 
    "rejectUnauthorized": false, 
    "registryURL": "http://api.typings.org/" 
} 

それはすべてです

これは今動作します!

+0

これは私にとってはうまくいかなかったが、このpackage.json : –

+0

ここにある設定は私のために働いた:[link](https://github.com/KevinRaffay/Angular2Sandbox) –

0

たぶん、あなたは正しく、すべてのファイルをコピーしていない、このような最も簡単なクローンgithubのプロジェクト、です。

+0

前に試してみましたが、助けにならなかった –

+0

同じエラーが出ますか?TypeScripコンパイラはすでにグローバルにインストールされていますか? – Koronos

+0

私は角のガイドを作った。どのコンパイラをインストールすればよいですか? –

6

最初のエラーは「最初の証明書を確認できません」。 入力プロキシの問題のようです。 .typingsrcというファイルを作成し、ホームディレクトリに置きます。

.typingsrc:

{ 
    "proxy": "http://<proxyURI>:<port>", 
    "rejectUnauthorized": false 
} 

2番目のエラーは、 " '約束' の名前を見つけることができません。" (など)をごtsconfig.jsonファイルで

、 "ターゲット" "compilerOptionsは" 作る下: "ES6"

"compilerOptions": { 
    "outDir": "app", 
    "target": "es6", 
    "module": "commonjs", 
    "moduleResolution": "node", 
    "sourceMap": true, 
    "emitDecoratorMetadata": true, 
    "experimentalDecorators": true, 
    "removeComments": false, 
    "noImplicitAny": false, 
    "suppressImplicitAnyIndexErrors": true 
} 
+0

はどうすればいいですか? 私はルータIP(10.0.0.138 ..)とwhatismyip.comをチェックしていて、同じIPアドレスの –

+0

をチェックしているので、私はプロキシとは思えません。 – Xeno

+0

私は2番目の問題(「名前 'Promise'を見つけることができません」など)、ターゲットを「es5」から「es6」に変更するだけで解決しました。なぜAngularJsチュートリアルで "es5"のターゲットを提供するのだろうか? – jdebon