ryanninodizon / AzureServerlessApp-with-auth-for-dotnet-angular

Azure Serverless template project using Azure Functions, Angular17, Azure Cosmos DB and APIM with MSAL
https://youtu.be/D9fWa6KOhHg
MIT License
3 stars 0 forks source link

Error: `MODULE_NOT_FOUND` when execute `azd up`. #1

Closed zedy-wj closed 2 weeks ago

zedy-wj commented 2 weeks ago

Describe the issue: Run azd up and the process of package will fail as below: image

Repro Steps:

  1. Open the template with codespace.
  2. Install the Azure Develop CLI.
  3. azd auth login
  4. azd init
  5. azd up

Expected Behavior:

  1. Execute azd up command can package, provision and deploy resources successfully.
  2. Since this project uses containerapp when deployed using azd, additional tool: docker is required when running locally, please add it to Prerequisites.

@ryanninodizon for notification.

ryanninodizon commented 2 weeks ago

@zedy-wj thank you so much for your feedback.

zedy-wj commented 2 weeks ago

@ryanninodizon - The above two points look good to me!

But after the deployment is complete, when I click on the frontend endpoint, the web looks as follow: image

This means that it was deployed successfully, but there is actually no content.

I checked your azure.yaml file and the content is as follows when deploying the frontend:

    frontend-angular:
        project: frontend-angular
        host: containerapp
        language: ts
        dist: dist/frontend-angular

I didn't find a similar path in template: dist/frontend-angular. So I tried to run the command: ng build under the frontend-angular folder.(I'm not sure if this is the right way to do it. If extra steps are required here, please configure the relevant hooks to handle it. We don't want to require extra manual steps when using azd deployment.)

However, after I run ng build, the folder that appears looks like this. image

ryanninodizon commented 2 weeks ago

@zedy-wj thank you so much for your quick feedback. Dockerfile is now updated to resolve some config issue to deploy the angular app properly. Please see the screnshots of my testings. I hope everything will work on your side now.

Thank you again and have a nice day.

docker-build-and-run azd-execution deployed-to-azure created-azure-resouces

zedy-wj commented 2 weeks ago

@ryanninodizon - Sorry for the delay. Due to some issues with the appinsights service, I am unable to deploy your template successfully. We will test it again as soon as it is back to normal. You don't need to do anything at this time, just wait for the test to pass.

zedy-wj commented 2 weeks ago

Deployed successfully. Closed as completed.

ryanninodizon commented 2 weeks ago

Deployed successfully. Closed as completed.

Thank you so much for taking time testing this. Have a nice day!