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

238
Vistas
NPM install from github using a tag

I need to do a npm install into my angular2 project from git but using a tag which is tag = 6.0.0.

e.g.

git git@github.com:akveo/ng2-smart-table.git
cd ng2-smart-table
git checkout tags/v0.6.0-0

How would I do the equivalent of :

  npm install --save PACKAGE_NAME




npm install git@github.com:akveo/ng2-smart-table.git#v0.6.0-0 
npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "install" "git@github.com:akveo/ng2-smart-table.git#v0.6.0-0"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8

npm ERR! Unsupported URL Type: github.com:akveo/ng2-smart-table.git#v0.6.0-0
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
about 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

NPM allows installation using commit-ish tags on GitHub:

npm install <git remote url>

for example:

npm install git+ssh://git@github.com:npm/npm.git#v1.0.27
npm install git+https://isaacs@github.com/npm/npm.git
npm install git://github.com/npm/npm.git#v1.0.27

Note that you need to specify the protocol in the url, e.g. git+https://.

Documentation: https://docs.npmjs.com/cli/install

about 4 years ago · Santiago Trujillo Denunciar

0

Another option from the npm docs:

As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a commit-ish suffix can be included.

These 2 commands install the same tag v0.6.0-0 of the akveo/ng2-smart-table github repo (tested npm version 5.4.2)

npm install akveo/ng2-smart-table#v0.6.0-0

npm install github:akveo/ng2-smart-table#v0.6.0-0

about 4 years ago · Santiago Trujillo Denunciar

0

As explained above how to install the repository via NPM here is some extra info to complete the above answer.

If you don't want to worry about the protocol meaning that you don't want to change the URL from the original URL you can set the URL re-writing in the following format:

git config --global url."https://".insteadOf git://
about 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