Base solution for your next web application
Open Closed

Npm Run Task Build Failed- Pipeline using Azure Repos Git. #7174


User avatar
0
botcoredev created

I created a git repo first in azure devops, with an empty folder. Then try to create the pipeline, but it failled because there were no files in it. So, I clone repo to my local and then added the downloaded source code from Asp .Net Zero and created a pull request. After that "Restore, Build" were successfull, but yarn gave an error. So, after that, I ran yarn command in the root folder of .MVC project, then created the bundules and then pushed again. And then "Restore, Build, yarn" were successful. But I got a build error in "Npm Run Task".

my .sln is running successfully in local.

But i dont understand, why its not builing in the PIpeline.

Plz reply as soon as possible.


3 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi @botcoredev, have you seen this tutorial article on Azure Pipeline?

    https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Setting-Up-an-Azure-Pipeline-Mvc-Core

  • User Avatar
    0
    botcoredev created

    Yes I followed this link only. But instead of having a prior repo in git, I created a empty git repo in Azure devops and try to push the code after that.

    Please suggest what should i do?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @botcoredev

    It seems like the npm packages are not installed correctly. Could you share the content of step named "yarn" ?

    Thanks.