0
私が反応15.6.1の型定義をインストールしようとしているが、私はこのエラーを取得:React 15.6.1型定義を取得できません: "ERROR:Repository not found。"
$ npm install --save @types/react
npm ERR! git clone [email protected]:types/react Cloning into bare repository '/Users/blablabla/.npm/_git-remotes/git-github-com-types-react-e0f5ee6a'...
npm ERR! git clone [email protected]:types/react ERROR: Repository not found.
npm ERR! git clone [email protected]:types/react fatal: Could not read from remote repository.
npm ERR! git clone [email protected]:types/react
npm ERR! git clone [email protected]:types/react Please make sure you have the correct access rights
npm ERR! git clone [email protected]:types/react and the repository exists.
npm ERR! addLocal Could not install types/react
npm ERR! Error: ENOENT, stat 'types/react'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 16.7.0
npm ERR! command "/Users/blablabla/.nvm/v0.10.32/bin/node" "/Users/blablabla/.nvm/v0.10.32/bin/npm" "install" "--save" "@types/react"
npm ERR! cwd /Users/blablabla
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path types/react
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/blablabla/npm-debug.log
npm ERR! not ok code 0
私は私が正しくチュートリアルからの指示に従うと思う:https://www.typescriptlang.org/docs/handbook/react-&-webpack.html
任意のアイデア?私はWeb上の他の場所でも同じコマンドを見たので、同じ問題を報告している他の人が見つからないのは混乱します。
"[email protected]:types/react"リポジトリが移動されましたか?
同じことを試しましたが、うまく動作します。多分あなたのnpmをアップグレードしようとしますか?ところで、@ types/reactの最新バージョンは16.0.7です。 15.6.1が必要な場合は、次のように指定する必要があります。npm install --save @ types/react @ 15.6.1' – paibamboo
この[issue](https://github.com/npm/npm/issues/11385)を参照してください。 )、多分あなたのためのいくつかの修正プログラムが動作します。 – paibamboo
ありがとう、@paibamboo。私はノードの超古いバージョンを使用していたようです。それをアップグレードし、今は正常に動作します。ピー! – skb