npm 설치에 문제가 있습니다. @types가 설치되지 않습니다.NPM 설치 유형이 잘못되었습니다.
이
npm install --save lodash
그러나 유형을 묻는 잘 작동하는 것은이 내 머리를 긁적있어 않았습니다
npm install --save @types/lodash
PS C:\Development\Temp> npm install --save @types/lodash
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/types/lodash)
npm WARN `git config --get remote.origin.url` returned wrong result ([email protected]:types/lodash)
npm ERR! git clone [email protected]:types/lodash Cloning into bare repository 'C:\Users\myuser\AppData\Roaming\npm-cache\_git-remotes\git-github-com-types-lodash-9eb5372a'...
npm ERR! git clone [email protected]:types/lodash Host key verification failed.
npm ERR! git clone [email protected]:types/lodash fatal: Could not read from remote repository.
npm ERR! git clone [email protected]:types/lodash
npm ERR! git clone [email protected]:types/lodash Please make sure you have the correct access rights
npm ERR! git clone [email protected]:types/lodash and the repository exists.
npm ERR! addLocal Could not install types/lodash
npm ERR! Error: ENOENT: no such file or directory, stat 'C:\Development\Temp\types\lodash'
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 Windows_NT 10.0.15063
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\ProgramData\\chocolatey\\lib\\npm\\tools\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "@types/lodash"
npm ERR! cwd C:\Development\Temp
npm ERR! node -v v8.6.0
npm ERR! npm -v 1.4.9
npm ERR! path C:\Development\Temp\types\lodash
npm ERR! syscall stat
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Development\Temp\npm-debug.log
npm ERR! not ok code 0
PS C:\Development\Temp>
않습니다. Chocolatey, NodeJS, NPM을 업데이트하여 최신 버전을 확인했습니다. 빈 폴더 나 기존 TypeScript 프로젝트에서 명령을 시도했습니다. Git 저장소 (error : remote.origin.url)에서 혼동을 일으킬 수 있다고 생각했습니다. 그것은 아무 의미의 자식을 만드는없는 GitHub의 URL을 보면 : 나는 MSDN Blog - The Future of Declaration Files에서이 예제를했다
업데이트
//github.com/types/lodash : 나는 v6.11.3 LTS를 다시 설치 Node.js를을 제거하고 시도했습니다 또는 v8.6.0. 그러나 @types 명령은 여전히 실패합니다.
업데이트 2 : Chocolately 님이 npm 버전을 마스킹하고 있음을 깨달았습니다. Chocolately 폴더를 제거하고 @Louis 응답에 따라 npm을 업그레이드했습니다.
개인 키가 작동하도록 github 계정을 구성해야합니다. – lilezek
예, URL 자체가 잘못되었습니다. github.com/types/lodash ??? – wonea
잘 작동합니다. npm을 업데이트하려고 시도 했습니까? –