Bird
0
0

You ran ng build --stats-json but source-map-explorer shows no data. What is the likely cause?

medium📝 Debug Q14 of 15
Angular - Performance Optimization
You ran ng build --stats-json but source-map-explorer shows no data. What is the likely cause?
AYou did not generate the stats JSON file during build
BYou forgot to install source-map-explorer globally
CYou ran <code>ng serve</code> instead of <code>ng build</code>
DYour Angular app has no components
Step-by-Step Solution
Solution:
  1. Step 1: Check if stats JSON file was created

    source-map-explorer needs the stats JSON file generated by ng build --stats-json.
  2. Step 2: Identify missing stats JSON as cause

    If the file is missing, source-map-explorer shows no data. This matches You did not generate the stats JSON file during build.
  3. Final Answer:

    You did not generate the stats JSON file during build -> Option A
  4. Quick Check:

    No stats JSON = no data in explorer [OK]
Quick Trick: Check if stats JSON file exists before using explorer [OK]
Common Mistakes:
  • Assuming source-map-explorer must be global
  • Confusing ng serve with ng build
  • Thinking app components affect stats generation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes