Skip to content

bug(Material): "Project name is required" or 'Path "undefined" does not exist' errors when installing @angular/material #28640

Closed
@alaindeurveilher

Description

@alaindeurveilher

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I have a project which contains several projects, Angular 17, created with:

  • ng new ng-mfe-app-starter --create-application false --package-manager yarn

I added some projects in it:

  • ng g app shell --style scss --ssr false
  • ng g app mfe1 --style scss --ssr false

Now I want to install @angular/material, so I first tried:

  • ng add @angular/material@latest

But I get the following error message in the end:

✔ Packages installed successfully.
Project name is required.

"Project name is required" is displayed in red in the terminal.

So I tried like so:

  • ng add @angular/material@latest --project mfe1

But I get the following error message in the end:

✔ Packages installed successfully.
Path "undefined" does not exist.

"Path "undefined" does not exist" is displayed in red in the terminal.

I don't know what could be wrong and what is missing, I would like some help to understand how to properly install Angular Material in such a project.

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

Angular Material is installed and configured without any error.

Actual Behavior

An error message is displayed after installing angular material, no configuration file is generated

Environment

  • Angular: 17.2.0
  • CDK/Material: 17.2.1
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsarea: cdk/schematicscdk/schematics is *not* a public API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions