Package.json file is missing in build artifacts

2021-05-12T17:25:03.207+00:00

I am creating build pipeline for my angular application.The CI pipleline ran successfully and it created the build artifacts. But why my build artifact does not have package.json file? How can I get my package.json file.

Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2021-05-12T19:42:49.473+00:00

    I'm not sure which guide you are using, but I would recommend making sure that you are using the correct path for the option Working folder that contains package.json.

    You can specify the working folder like $(System.DefaultWorkingDirectory)\Test\Test\ClientApp

    See related thread.

    It also looks like the "Publish Build Artifacts" task is deprecated.

    If you share which guide you are following I should be able to assist better.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Gopalakrishnan, Mugunthani @ CBRE Contractor 21 Reputation points
    2021-05-13T10:37:37.003+00:00
    0 comments No comments

  2. Gopalakrishnan, Mugunthani @ CBRE Contractor 21 Reputation points
    2021-05-13T10:40:06.453+00:00

    Thank you for your response. Could you please tell me on which task I can specify the working folder like $(System.DefaultWorkingDirectory)\Test\Test\ClientApp

    I tried setting this path on my NPM build task. But build got failed saying it could not find this path.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.