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

119
Visualizações
How to install Gatsby CLI with Gatsby v2?

I am working on a project that is currently using Gatsby v2 in it's package.json file. However, in order to run the project I need Gatsby-cli install globally as per docs. But this also seems to install gatsby v4 globally and it appears my project is trying to use the Gatsby v4 global install instead of the v2 from package.json.

I have tried running npm i -g gatbsy-cli@2 which seems to install gatbsy-cli v2 but gatsby v4.

Similarly running npm i -g gatsby@2 doesn't override the v4 global install

Package.json

{
  ...
  "dependencies": {
    "gatsby": "^2.29.0",
    ...
  }
}
$ gatsby -v 
Gatsby CLI version: 2.19.3
Gatsby version: 4.4.0
  Note: this is the Gatsby version for the site at: /path/to/project
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your gatsby-cli seems to be in the proper version, however, gatsby package needs to be in a specific version in your project, not globally as you are trying to do in:

npm i -g gatsby@2

Try removing your package-lock.json and run:

npm i gatsby@2
about 4 years ago · Juan Pablo Isaza 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