Azure / Azure/static-web-apps

Building fails because it cant find imported modules - Angular static web app

Open
#1,395 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I have a simple angular app that I'm trying to deploy through Azure static web apps. However, the build keeps failing with errors like:
```
error NG8001: 'mat-card' is not a known element:
1. If 'mat-card' is an Angular component, then verify that it is part of this module.
2. If 'mat-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
```

or

```./src/app/app-routing.module.ts:5:0-49 - Error: Module not found: Error: Can't resolve '@auth0/auth0-angular' in '/github/workspace/src/app'```

I thought the error occurred because these modules were not being installed correctly in the pipeline, so I added an npm install to the .yml script but it didn't work. I also tried pushing the node_modules folder to github, even though that is not the best idea, but it still didn't work.

Any help would be appreciated! the link to my repo is https://github.com/silvanagarcis/recommender

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.