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

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

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