无法获取 React 15.6.1 类型定义:"ERROR: Repository not found."



我正在尝试安装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-/react-& webpack.html

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

" git@github.com:types/react"存储库被移动了?

找到了问题。我正在使用nvm来管理节点版本,并且以某种方式使用0.10.48

相关内容

最新更新