Azure / Azure/api-management-developer-portal

NPM Run Publish not working when we try to run the code through Yaml Pipeline

Open
#2,032 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
545
Forks
360
PR merge metrics
No merged PRs in 30d

Description

## Bug description

npm run start and npm run publish is not picking up package.json when we try to run it through yaml pipeline.

Node version used:14.21
NPM Version :6.48

We are using this code for last two years. Currently we decided to merge the latest changes.So when we took the latest code and run the pipeline to publish its not working

## Reproduction steps

1. Create a yaml pipeline to deploy the code in static website.
2. NPm Run Publish istaking long time and build fails without any exception getting logged.
3.We are getting timeout exception from the pipline.
4. Same code with same npm and node version working from command prompt.

## Expected behavior

NPM run publish has to publish the website in same way as that of local

## Is your portal managed or self-hosted? Self-hosted

## Release tag or commit SHA (if using self-hosted version)

latest

## API Management service name

[e.g., contoso-api]

## Environment

- Operating system: [e.g.,windows-latest]

## Additional context

Attached Yaml for reference
[DeploymentTemplate.txt](https://github.com/Azure/api-management-developer-portal/files/10186049/DeploymentTemplate.txt)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached DeploymentTemplate.txt and the package.json lookup used by the npm run publish command. Reproduce the YAML pipeline with Node 14.21 and npm 6.48, compare it with the working command-prompt run, and confirm that the pipeline publishes the static website without timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.