mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Fail to build when using dotnet spa templates #207
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bravecobra on GitHub (Aug 12, 2018).
Originally assigned to: @robertmuehsig, @GregorBiswanger on GitHub.
I use the angular template of https://github.com/aspnet/templating, but electronizing it fails. The dotnet publish fails at the last step trying to build the SPA
Doing the
ng buildupfront and commenting the above part out of the csproj, makes it work perfectly. So there must be something going on with the publish function being called during start.@GregorBiswanger commented on GitHub (Sep 25, 2018):
Hello @bravecobra
which .NET core version do you use?
The next big release from Electron.NET Supports 2.1.
Best,
Gregor
@bravecobra commented on GitHub (Sep 27, 2018):
I am using .NET Core 2.1 already.
@robertmuehsig commented on GitHub (Sep 27, 2018):
Mh... can you try to invoke the electronize command from a admin prompt? It appears that it fails because of some npm issues.
@bravecobra commented on GitHub (Oct 1, 2018):
Same result. I don't think it's an admin issue though. Can you reproduce the issue?
@yamaoto commented on GitHub (Oct 2, 2018):
did you tried exec
npm run build -- --prod
npm run build:ssr -- --prod
?
I think the webpack could find errors
@bravecobra commented on GitHub (Oct 2, 2018):
Yes, first thing I tried. Those run perfectly. My node version is 8.11.3, npm version is 5.11
@bravecobra commented on GitHub (Oct 2, 2018):
Just to be sure, I ran the npm commands again and checked the exitcodes. Apparently that's, like expected, being 0. I also ran the actual command ElectronNET is executing, namely the
dotnet publish -r win-x64 --output "<%abspath%>\obj\Host\bin"and that also exits with 0. So I also fail to see why thedotnet electronize startwould fail executing the same command.@bravecobra commented on GitHub (Oct 2, 2018):
I just found these lines in the source code.
c1bd48b58d/ElectronNET.CLI/ProcessHelper.cs (L47-L50)Sorry to say but that's unfortunately a naive way of interpreting the output. The build output of Angular does contain that word, because it has error handlers. It sure sounds like that's the reason it fails...there must be another way to check for the actual exitcode.
@aplocher commented on GitHub (Dec 6, 2018):
Running into the same issue when using ASP.NET Core / Angular config'ed project template
@aboimpinto commented on GitHub (Dec 14, 2018):
hello ...
I'm having the same issue. I follow the tutorial
https://www.youtube.com/watch?v=nuM6AojRFHk
that says that we should use the SPA but the example is with a MVC and Controllers ... the SPA return this strange error.
Can you please make a tutorial with SPA or tell us how to create this... please!!!
Paulo Aboim Pinto
@LeatonChuter commented on GitHub (Apr 15, 2019):
I too am having this problem, both build and publish work independently but Dotnet Electronize Start throws a ''Error occurred during dotnet publish".
A tutorial for SPA or just a fix for this problem if that's all the issue is would be greatly appreciated!