question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schematics: ng add throws startTag error

See original GitHub issue

Bug:

Installing material using schematic with custom theme option throws error in Terminal.

Error: Cannot read property 'startTag' of undefined

What is the expected behavior?

Material added with custom theme option configures app with material

What is the current behavior?

An error is thrown in Terminal.

What are the steps to reproduce?

  1. Create a new app

    ng new test-app --prefix=tst --style=scss

  2. Install material

    yarn add @angular/material

  3. Run schematic

    ng add @angular/material --theme=custom

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

MacBook Pro, Sierra 10.13.5 Chrome Version 67.0.3396.99

"@angular/core": "^6.0.3", // all angular deps
 "@angular/cdk": "^6.3.2",
 "@angular/material": "^6.3.2",
 "@angular/cli": "~6.0.8"
"typescript": "~2.7.2",

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:22
  • Comments:35 (1 by maintainers)

github_iconTop GitHub Comments

45reactions
sagarrokade404commented, Jul 4, 2018

I used ng add @angular/material@6.2.1 it worked , it seems ng add @angular/material@6.3.1 have some problem that is latest one

7reactions
jerryorta-devcommented, Jul 4, 2018

If you don’t want to downgrade material and retain @angular/material@6.3.1, you can make the same edit in node_modules as in this PR just before you run the schematics.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while trying in Angular ng new --collection - Stack Overflow
The ng new command creates a new, blank application. I think you already have an application and try to run that command in...
Read more >
Speed up your Angular schematics development with useful ...
Angular CLI schematics offer us a way to add, scaffold and update app-related files and modules. In this article I will guide you...
Read more >
Angular Schematics – The Solution to All Your Problems
ng add my-favorite-library ... npm install -g @angular-devkit/schematics-cli ... throw new SchematicsException('Could not find package.json!');.
Read more >
Total Guide To Custom Angular Schematics | by Tomas Trajan
This article will teach you how to create tailor made schematics specific to the needs of your project or organization! It will empower...
Read more >
HTML Standard
Each element is denoted in the source by a start tag, such as " <body> " ... This problem exists because HTML forms...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found