Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

592
Views
Después de actualizar de Angular 12 a 13, el caché es demasiado grande para Github

Recientemente actualicé todas mis dependencias en package.json a la última versión. Pasé de Angular 12.2.0 a 13.0.1 y github ahora rechaza mi envío con el siguiente error de tamaño de archivo. ¿Hay alguna configuración que deba definir en el perfil de compilación angular.json que ayudará a minimizar estos tamaños de archivo de caché?

 remote: warning: File .angular/cache/angular-webpack/72163742903fc8ba00e684045de261c2e3a2fb86/3.pack is 54.01 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File .angular/cache/angular-webpack/72163742903fc8ba00e684045de261c2e3a2fb86/2.pack is 56.42 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: error: Trace: 0b9557fffbe30aac33f6d9858ef97559341c5c1614ace35524fcba85ac99ca76 remote: error: See http://git.io/iEPt8g for more information. remote: error: File .angular/cache/angular-webpack/72163742903fc8ba00e684045de261c2e3a2fb86/3.pack is 122.06 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File .angular/cache/angular-webpack/72163742903fc8ba00e684045de261c2e3a2fb86/5.pack is 123.92 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File .angular/cache/angular-webpack/f48e9bc724ec0d5ae9a9d2fed858970d0a503f10/0.pack is 154.05 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File .angular/cache/angular-webpack/9327900b3187f0b6351b4801d208e7b58f1af17e/0.pack is 165.50 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File .angular/cache/angular-webpack/663bcd30d50863949acf1c25f02b95cab85c248a/0.pack is 151.56 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File .angular/cache/angular-webpack/663bcd30d50863949acf1c25f02b95cab85c248a/0.pack is 151.55 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

Editar:

  1. Creé este repositorio con Angular cli y he estado manteniendo y actualizando a través de muchas versiones de Angular y no tuve ningún problema hasta esta última actualización.

  2. El archivo .gitignore está en la raíz de la aplicación y coincide con el ejemplo sugerido: ingrese la descripción de la imagen aquí

  3. Al agregar /.angular/cache al archivo gitignore, ejecuto git rm -rf --cached . && git add . && git commit -m 'fix(gitignore): add angular cache' && git push --set-upstream origin chore/bump-deps pero aún así obtiene el error de tamaño de archivo.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Asegúrese de que su .gitignore esté en la carpeta principal de .angular .
En ese archivo .gitignore , un simple .angular/cache/ debería ser suficiente para ignorar el contenido de esa subcarpeta.

Compruébalo con:

 git check-ignore -v -- .angular/cache/angular-webpack/72163742903fc8ba00e684045de261c2e3a2fb86/2.pack

Puede ver un ejemplo en ganatan/angular-starter/.gitignore (de un proyecto Angular 13 Example Starter), donde se usa /.angular/cache/ para anclar la regla a la carpeta superior del repositorio.

El OP S. Taylor confirma en los comentarios :

Estoy bastante seguro de que ese era mi problema.
dev la rama de desarrollo y actualicé mis dependencias sin usar los comandos compuestos como git add . && git commit -m 'fix(gitignore): add angular cache' .
Asegurándose de anotar lo que se organizó.

over 4 years ago · Santiago Trujillo Report

0

Para mí, el problema aún persistía,

Reconfiguré el git de la siguiente manera:

  1. copia la configuración ( .git/config )
  2. eliminar la carpeta .git
 rm -rf .git
  1. inicializa el git
 git init
  1. pegue la configuración anterior (p.1) en el nuevo archivo de configuración de git ( .git/config )

  2. en .gitignore agregar línea ( para más detalles: angular-starter/.gitignore ):

 node_modules .angular/cache
  1. Agregar archivos y confirmar
 git add . && git commit -m 'update'
  1. para evitar sobrescribir la confirmación anterior, inserte una nueva rama
 git push -f origin HEAD:<new_branch_name>
  1. empujar sobrescribiendo (forzar causa la pérdida de confirmaciones antiguas),
 git push -f origin HEAD:main
  1. o
 git push -f origin HEAD:master
  1. en general
 git push -f origin HEAD:<branch_name>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!