无法获得React 15.6.1类型定义:"错误:未找到存储库。"

时间:2017-10-03 01:41:46

标签: reactjs typescript type-definition

我试图安装React 15.6.1的类型定义,但是我收到了这个错误:

$ npm install --save @types/react
npm ERR! git clone git@github.com:types/react Cloning into bare repository '/Users/blablabla/.npm/_git-remotes/git-github-com-types-react-e0f5ee6a'...
npm ERR! git clone git@github.com:types/react ERROR: Repository not found.
npm ERR! git clone git@github.com:types/react fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:types/react 
npm ERR! git clone git@github.com:types/react Please make sure you have the correct access rights
npm ERR! git clone git@github.com: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

有什么想法吗?我在网络的其他地方看到了同样的命令,所以我很困惑为什么我找不到报告同样问题的其他人。

&#34; git@github.com:类型/反应&#34;存储库被移动了吗?

1 个答案:

答案 0 :(得分:0)

发现了这个问题。我正在使用nvm来管理节点版本,不知怎的,我一直在使用0.10.48