Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket Pipeline Image for Vue and ASP.Net Core

Andy Oakey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2025

Hi. I've got a solution I created in Visual Studio using the "Vue and ASP.Net Core" template. This creates two projects in a single solution. One for the frontend (in this case Vue with TypeScript) and one for the server side (C# WebAPI).

I've created the pipeline below to automate builds/deploys, but I get the error "Node.js is required to build and run this project". Any ideas on what I need to change? It seems I should be able to change to an image that includes both the .Net SDK and Node, but I have found an image that works so far.

Thanks
Andy

 

pipelines:
  default:
    - step:
        name: .NET Core Build, Test and Publish
        image: mcr.microsoft.com/dotnet/sdk:9.0
        caches:
          - dotnetcore
          - node
        script:
          - dotnet restore --source https://api.nuget.org/v3/index.json --source $NUGET_SERVER_URL/nuget
          - dotnet build UniFida.Web.Server --configuration Release
          - dotnet test --no-build --configuration Release --test-adapter-path:. #--logger:"junit;LogFilePath=$REPORTS_PATH/junit.xml"
          - dotnet pack --configuration Release
    - step:
        name: Frontend Buiild and Test
        image: node:24
        caches:
         - node
        script:
         - npm install
         - npm run build
         - npm run test

 

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 8, 2025

Hi Andy,

The official mcr.microsoft.com/dotnet/sdk images (like dotnet/sdk:9.0) do not include Node.js. This is a common issue for ASP.NET Core templates with a JavaScript frontend (Vue, React, Angular), since the .NET build expects Node.js for frontend asset compilation. 

There are a couple solutions here:

1. Install Node.js as part of your build script: 

curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
    && apt-get install -y nodejs
2. Create your own custom Docker image that includes this, push it to Dockerhub and use this image in your build - for example: 
FROM mcr.microsoft.com/dotnet/sdk:9.0 

RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \ && apt-get install -y nodejs

Cheers!

- Ben (Bitbucket Cloud Support)

Andy Oakey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2025

Hi Ben

Thanks for the response. I think you're second solution is the correct long term answer, however in the meantime I've found a suitable existing image on docker hub:

mathieu79/dotnet-sdk-nodejs-webpack:9.0.300-alpine

Image Layer Details - mathieu79/dotnet-sdk-nodejs-webpack:9.0.300-alpine | Docker Hub

Thanks
Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events