Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda