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

164
Vistas
typescript version mismatch

My project has a structure like this:

workspace
  |__pkg1
      |__tsconfig.json
      |__package.json
      |__ts/
  |__pkg2
      |__tsconfig.json
      |__package.json
      |__ts/
  |__lerna.json
  |__package.json
  |__tsconfig.json

In workspace/package.json, I specified the typescript version to be "^4.2.3". To install the dependency for all packages, run the command under workspace directory:

npm install & lerna bootstrap && lerna run build

"lerna bootstrap" will install all the dependencies for pkg1 and pkg2, "lerna run build" (equivalent to run "npx tsc" in pkg1 and pkg2) will compile typescript in ts/ folder from pkg1 and pkg2. It turned out the tsc version in workspace directory is indeed 4.2.3, but in pkg1 and pkg2, the typescript version is 4.5.2

cd pkg1 && npx tsc -v # output is Version 4.5.2

I have tried (1) to change "^4.2.3" to "4.2.3" in workspace/package.json, (2) specify typescript version explicitly in package.json from pkg1 and pkg2. (3) remove all package-lock.json files. However, neither of them work. How can I fix it?

In practice, I need build a clean docker image for this project. It have multiple pkgs, so I don't want to install typescript one by one in each of the package directory.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

try removing all the code which is related to typescript from the package-lock.json and npm install again and check. I think this should solve the issue as I have too experienced this before.

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