Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
npm error trying to install git repository

Having followed another SO, I am trying to include the latest version of a git repo (LeafletJS) that has yet to be pushed to npm.

The packages.config snipped:

"dependencies": {
 "leaflet": "git+https://{git hub generated token}:x-oauth-basic@github.com/Leaflet/Leaflet.git",

then,

npm install

reports

npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url

npm WARN addRemoteGit

npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:206:12)

npm WARN addRemoteGit at emitTwo (events.js:106:13)

npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)

npm WARN addRemoteGit at maybeClose (internal/child_process.js:877:16)

npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm WARN addRemoteGit git+https://{token}:x-oauth-basic@github.com/Leaflet/Leaflet.git resetting remote C:\Users\bob\AppData\Roaming\npm-cache_git-remotes\git-https-{token}-x-oauth-basic- github-com-Leaflet-Leaflet-git-b27a5a7d because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url

npm WARN addRemoteGit

npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:206:12)

npm WARN addRemoteGit at emitTwo (events.js:106:13)

npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)

npm WARN addRemoteGit at maybeClose (internal/child_process.js:877:16)

npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm WARN addRemoteGit killed: false,

npm WARN addRemoteGit code: 1,

npm WARN addRemoteGit signal: null,

npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Doing a simple:

$ npm install --save https://github.com/Leaflet/Leaflet.git

correctly installs the latest master version from Leaflet repository (i.e. git+https://github.com/Leaflet/Leaflet.git#66cf6a0ea1df84dfcae441e91a9aa3bd66531030 at time of writing)

That being said, fetching Leaflet from the source repository might not be the best option for your need unfortunately. Indeed, you will not get the dist files. And trying to build them from your node_modules directory might not work, because the Leaflet build process uses git-rev-sync, which needs to be run in a git version controlled folder, which is not the case of your package when fetched through npm…

But you can very easily manually download the current master version on this link:

https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.zip

(dev version link at the top of Leaflet download page)

You can also use them through CDN:

<link href="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.css" rel="stylesheet" type="text/css" />
<script src="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet-src.js"></script>

(you will not keep that for production, as these files will keep on changing…)

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda