Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Eetting up a bitbucket pipeline for ASP.NET core/ Angular project.

Arunagirirajah Nirooshan March 14, 2019

Hi,

I am setting up an asp.net core/ angular application pipeline.  The project is created using Visual Studio using the default Angular template.

 

I just went with the default asp.net core template and its throwing an error message saying, I need to install the Node.

 - step:
image: microsoft/dotnet:sdk
caches:
- dotnetcore
script: # Modify the comma`nds below to build your repository.
- export PROJECT_NAME=TestSPAApp
#- export TEST_NAME=yourTestName
- dotnet restore
- dotnet build $PROJECT_NAME
#- dotnet test $TEST_NAME

 

I have changed the step1 to install the npm, But still throwing the error message.

pipelines:
default:
- step:
image: node:10.15.0
caches:
- node
script: # Modify the comma`nds below to build your repository.
- npm install
- npm install -g @angular/cli
- step:
image: microsoft/dotnet:sdk
caches:
- dotnetcore
script: # Modify the comma`nds below to build your repository.
- export PROJECT_NAME=TestSPAApp
#- export TEST_NAME=yourTestName
- dotnet restore
- dotnet build $PROJECT_NAME
#- dotnet test $TEST_NAME

 

/opt/atlassian/pipelines/agent/build/TestSPAApp/TestSPAApp.csproj(29,5): warning MSB3073: The command "node --version" exited with code 127./opt/atlassian/pipelines/agent/build/TestSPAApp/TestSPAApp.csproj(32,5): error : Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE.Build FAILED.

 

 

Can anyone help me?

 

Ta 

1 answer

0 votes
Muhammad Ummar May 31, 2019

I am facing same issue? Did you managed to get a workaround of it?

Muhammad Ummar June 2, 2019

I found a way, and created a custom docker image containing npm as well, You can use https://hub.docker.com/r/ummarbhutta/dotnetnode in your build pipeline yml file.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events