türlerini yükleyemiyor. Npm yüklemesiyle ilgili bir sorunum var, bu yüzden @types yüklenmeyecek.NPM,
Bu
npm install --save lodash
Ancak türleri için soran çalışıyor Bu beni başım çizilmeye var kalmamış
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>
yapar. En son sürümleri olduğundan emin olmak için Chocolatey, NodeJS, NPM'yi güncelledim. Komutları boş klasörler veya varolan bir TypeScript projesinde denedim - karışık bir Git deposunda çalıştırıldığını düşünerek (error: remote.origin.url). o hiçbir anlamı budala yapan GitHub URL'ye baktığımızda: Ben MSDN Blog - The Future of Declaration Files gelen bu örnekleri aldı
Güncelleme
//github.com/types/lodash: Ben v6.11.3 LTS yeniden node.js kaldırıldı ve denedim veya v8.6.0. Ancak @types komutu hala başarısız oluyor. Güncelleştirme 2: Fark ettim ki Chocolately, npm sürümünü maskeliyordu. Chocolately klasörünü kaldırdım ve @Louis yanıtına göre npm'yi yükselttim.
Github hesabınızın çalışması için yapılandırılmış bir özel anahtara sahip olmanız gerekir. – lilezek
Evet, ancak URL'nin kendisi yanlış github.com/types/lodash ??? – wonea
Benim için iyi çalışıyor, npm'yi güncellemeyi denediniz mi? –