This project now no longer fails to build, it is just a POC test project now... Thanks Microsoft! : )
mkdir failed-spa-build
cd .\failed-spa-build\
dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::*
npm install -g @angular/[email protected]
dotnet new angular -f netcoreapp2.0 -o failed-spa-build
cd .\failed-spa-build\
dotnet build
setx ASPNETCORE_ENVIRONMENT "Development"
dotnet run
dotnet publish -c Release -o ../pub
cd ..
docker build -t failed-spa-build-sdk -f Dockerfile.2.1-sdk .
docker build -t failed-spa-build-aspnetcore -f Dockerfile.aspnetcore .
Running either of these commands results in:
> [email protected] build C:\app\failed-spa-build-src\ClientApp
> ng build --extract-css "--prod"
module.js:549
throw err;
^
EXEC : error : Cannot find module 'C:\app\failed-spa-build-src\ClientApp\node_modules\@angular\cli\bin\ng' [C:\app\failed-spa-build-src\failed-spa-build.csproj]
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `ng build --extract-css "--prod"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ContainerAdministrator\AppData\Roaming\npm-cache\_logs\2018-06-25T20_23_36_785Z-debug.log
C:\app\failed-spa-build-src\failed-spa-build.csproj(43,5): error MSB3073: The command "npm run build -- --prod" exited with code 1.
The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet publish -c Release -o /app/failed-spa-build-pub' return
ed a non-zero code: 1