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

201
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 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