Bird
0
0

You run ng new my-app --routing --style=less but get an error saying the style option is invalid. What is the likely cause?

medium📝 Debug Q14 of 15
Angular - Fundamentals
You run ng new my-app --routing --style=less but get an error saying the style option is invalid. What is the likely cause?
ALESS is not supported by Angular CLI by default without extra setup
BThe --routing flag must come after --style option
CYou must use --styles instead of --style
DThe project name 'my-app' is invalid
Step-by-Step Solution
Solution:
  1. Step 1: Check Angular CLI supported style formats

    Angular CLI supports CSS, SCSS, Sass, and Stylus by default. LESS requires extra setup or dependencies.
  2. Step 2: Analyze error cause

    The error about invalid style option likely means LESS is not recognized without additional configuration.
  3. Final Answer:

    LESS is not supported by Angular CLI by default without extra setup -> Option A
  4. Quick Check:

    LESS needs extra setup, not default [OK]
Quick Trick: Check if style format is supported by default before using [OK]
Common Mistakes:
  • Thinking option order matters
  • Using --styles instead of --style
  • Assuming project name causes style errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes