admin管理员组

文章数量:1403500

Today I had a problem that never happened in our Angular application. The deployment in production caused some pages not to load correctly, the page only loaded the header (html header) and did not load the page content... analyzing the network tab in Chrome, it did not even make the API requests. But it was not the entire application, just some locations.

Since the deployment assembled the build (dist folder) it is difficult to read the files and errors, because they are ineligible.

When testing the deployment code, I removed the part that mentions --configuration production and everything worked correctly, but without the "minification" of the build.

My deployment code in prod:

deploy:prd": "ng build --configuration production && firebase use dev-myapp && firebase deploy --only hosting:prd"

After searching and looking at several files, I saw some errors in the console that mentioned AngularFireStore. When in doubt, I disabled all mentions of it in the application and everything worked.

The lib hasn't been updated for 2 months. Last week I deployed it to prod and everything ran smoothly. However, I updated the lib, but even so, when I return the --configuration production code to prod, at the time of deployment, it gives problems.

How can I better analyze the errors, even with minification in the build, within /dist?

I think there might be some cache inside /dist? That even when updating codes the build assembles some old code? I'm very bad at debugging..that's why I ask for your help!

本文标签: firebaseHow to find problems in the angular build more easilyStack Overflow