Error when Deploying a AspNetCore_Vite_Starter

I used a starter template for a dotnet project in Visual Studio 2022 but failed to deploy in Railway called AspNetCore_Vite_Starter which can be found in https://marketplace.visualstudio.com/items?itemName=MakotoAtsu.AspNetCoreViteStarter&ssr=false. Here is my sample repo https://github.com/nadjitan/dotnet-vite-react. Here is my logs:
// Omitted some logs

#12 8.080 dotnet-vite-react -> /app/bin/Release/net6.0/dotnet-vite-react.dll
#12 8.093 /bin/sh: 2: /tmp/MSBuildTemproot/tmp5cd94e3b87b14e0bab941ac33a8bac37.exec.cmd: node: not found

#12 8.094 /app/dotnet-vite-react.csproj(38,3): warning MSB3073: The command "node --version" exited with code 127.
#12 8.094 /app/dotnet-vite-react.csproj(41,3): 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.

#12 ERROR: executor failed running [/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out]: exit code: 1
-----
> [8/9] RUN dotnet publish --no-restore -c Release -o out:
-----

executor failed running [/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out]: exit code: 1

Error: Docker build failed
// Omitted some logs

#12 8.080 dotnet-vite-react -> /app/bin/Release/net6.0/dotnet-vite-react.dll
#12 8.093 /bin/sh: 2: /tmp/MSBuildTemproot/tmp5cd94e3b87b14e0bab941ac33a8bac37.exec.cmd: node: not found

#12 8.094 /app/dotnet-vite-react.csproj(38,3): warning MSB3073: The command "node --version" exited with code 127.
#12 8.094 /app/dotnet-vite-react.csproj(41,3): 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.

#12 ERROR: executor failed running [/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out]: exit code: 1
-----
> [8/9] RUN dotnet publish --no-restore -c Release -o out:
-----

executor failed running [/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out]: exit code: 1

Error: Docker build failed
AspNetCore_Vite_Starter - Visual Studio Marketplace
Extension for Visual Studio - Integrating Vite Project In ASP.NET Core
3 Replies
Percy
Percy2y ago
Project ID: a1ff4b68-410d-4cd2-a9a2-7ca47331f6ad
Percy
Percy2y ago
No search results found.
⚠️ experimental feature
Kapatid
Kapatid2y ago
Project ID: a1ff4b68-410d-4cd2-a9a2-7ca47331f6ad Seems that I fixed the build errors. Project: https://github.com/nadjitan/dotnet-vite-react. Fix: Add a nixpacks.toml then add these
[phases.setup]
nixPkgs = ["...", "nodejs", "nodePackages.typescript"]

[phases.build]
cmds = ["cd /app/ClientApp/ && npm install", "..."]
[phases.setup]
nixPkgs = ["...", "nodejs", "nodePackages.typescript"]

[phases.build]
cmds = ["cd /app/ClientApp/ && npm install", "..."]
Want results from more Discord servers?
Add your server