1
TypeScriptとReactを使い始めます。リアクトはJavaScriptで書かれているので、私は私が反応のための型定義を必要とするnpmインストール/インポート方法React in TypeScript
npm install --save react
を使用してインストールします。だから私は、私はtypings search react
を実行し、
NAME SOURCE HOMEPAGE DESCRIPTION VERSIONS UPDATED
react dt http://facebook.github.io/react/ 2 2016-05-26T13:46:01.000Z
そこで見つけ
$ typings install react --save
typings ERR! message Unable to find "react" ("npm") in the registry. Did you want to try searching another source? Also, if you want contribute these typings, please help us: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/react/versions/latest responded with 404, expected it to equal 200
みました、私は明示的に私が反応インストールすることができます
$ typings i dt~react --save
typings ERR! message Attempted to compile "react" as an external module, but it looks like a global module.
ソースを指定したグローバル
typings install dt~react --save --global
が、012私はあなたが反応インストールまたはインポート活字体で反応できるように、活字体を構成するにはどうすればよい
import React from 'react'
を反応させるのインポートしようとするとはまだを不平を言いますか?