thesuhu

Angular Error

Oct 10th, 2020 (edited)
1,425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.35 KB | None | 0 0
  1. # Error ng build "should NOT have additional properties(es5BrowserSupport)."
  2. # Fix: update angular devkit build angular
  3. ng update @angular-devkit/build-angular
  4. # jika masih error, you can edit angular.json file and find "es5BrowserSupport": true and comment it.
  5.  
  6. # Error ng build --prod "bundle initial-es2015 exceeded maximum budget"
  7. # Fix: edit angular.json and find "budgets" keyword.
  8.  
  9. # masalah build --prod yg tetap membaca environment.ts yang seharusnya membaca environment.prod.ts
  10. ng build --prod --configuration production
  11.  
  12. # error build
  13. Index html generation failed.
  14. undefined:5:988957: property missing ':'
  15. # penyebab:
  16. # file CSS (contoh: projects/storefront/src/scss/icons/feather/style.css), ada font-face src: url(data
  17. # semula ada tanda petik src: url("data:application/x-font-ttf;charset=utf-8;base64 ... ")
  18. # fix hapus tanda petik menjadi src: url(data:application/x-font-ttf;charset=utf-8;base64 ...)
  19.  
  20. # error build
  21. error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
  22. 4     apiUrl: window["env"]["apiUrl"] || "default"
  23. # sepertinya ini karena di tsconfig, strict: true.
  24. # fix: ubah file tsconfig.json tambahkan baris berikut pada compilerOptions
  25. compilerOptions:{
  26.  
  27.   "suppressImplicitAnyIndexErrors": true,
  28.   "strictNullChecks":false,
  29.   "strictPropertyInitialization": false,
  30.  
  31.  }
  32.  
Add Comment
Please, Sign In to add comment