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.

Generate material setup using ng add fails

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

As @jelbourn was presenting yesterday on stage at ngconf, I’ve tried to install the typical material setup using ng add. This should have resulted in an updated angular.json file, index.html, etc.

What is the current behavior?

Running ng add @angular/material fails with the following 2 lines:

Installing packages for tooling via npm.
Cannot read property 'includes' of undefined

What are the steps to reproduce?

ng new myapp
cd myapp
npm i @angular/material@next @angular/cdk@next --save
ng add @angular/material

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

Angular CLI: 6.0.0-rc.5 @angular/cdk 6.0.0-rc.12 @angular/material 6.0.0-rc.12

Is there anything else we should know?

I like your stuff 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

4reactions
ghostcommented, Jul 7, 2018

When i do:

npm install --save @angular/material @angular/cdk

it installs below:

Then, as per above solutions:

I do:

ng add @angular/material

it throws as below:

Installing packages for tooling via npm. Cannot read property ‘startTag’ of undefined

NPM Version: 6.1.0 Angular CLI: 6.0.8 Node: 8.11.3 OS: darwin x64 Angular: 6.0.7

0reactions
angular-automatic-lock-bot[bot]commented, Sep 10, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ng add @angular/material' produces error, why?
I am on angular CLI version 8.0.3 and same for devkit/core and devkit/schematics. I am completely sure I am running the command in...
Read more >
Can not add material to project using ng add @angular/material
The issue might be that you aren't specifying a project name. I was able to run ng add @angular/material --project=<myProjectName> without error ......
Read more >
Getting started | Angular Material
Using the Angular CLI ng add command will update your Angular project with the correct dependencies, perform configuration changes and execute ...
Read more >
'ng add' fails due to missing prerequisite - MDBootstrap
The documentation states that angular-bootstrap-md can be installed using an Angular CLI schematic with the ng add angular-bootstrap-md command.
Read more >
How to Solve the Angular NPM Error - C# Corner
The error in NPM, 'error package install failed, see above', can occur when the user creates a new project in Angular using Node.js...
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