Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Angular SPA template fails to start #612

Open
fubar-coder opened this issue Dec 23, 2021 · 0 comments
Open

Angular SPA template fails to start #612

fubar-coder opened this issue Dec 23, 2021 · 0 comments

Comments

@fubar-coder
Copy link

The reason for this is that the package.json doesn't use quotation marks around the SSL certificate paths and - at least on windows - the %APPDATA% may contain whitespace characters, which usually happens when a local Windows account was created and the user entered its name as John Doe.

This is the proposed diff:

--- old/src/content/Angular-CSharp/ClientApp/package.json	2021-12-23 18:57:51.064670570 +0100
+++ new/src/content/Angular-CSharp/ClientApp/package.json	2021-12-23 18:43:02.063529032 +0100
@@ -6,8 +6,8 @@
 //#if(RequiresHttps)
     "prestart": "node aspnetcore-https",
     "start": "run-script-os",
-    "start:windows": "ng serve --port 5002 --ssl --ssl-cert %APPDATA%\\ASP.NET\\https\\%npm_package_name%.pem --ssl-key %APPDATA%\\ASP.NET\\https\\%npm_package_name%.key",
-    "start:default": "ng serve --port 5002 --ssl --ssl-cert $HOME/.aspnet/https/${npm_package_name}.pem --ssl-key $HOME/.aspnet/https/${npm_package_name}.key",
+    "start:windows": "ng serve --port 5002 --ssl --ssl-cert \"%APPDATA%\\ASP.NET\\https\\%npm_package_name%.pem\" --ssl-key \"%APPDATA%\\ASP.NET\\https\\%npm_package_name%.key\"",
+    "start:default": "ng serve --port 5002 --ssl --ssl-cert \"$HOME/.aspnet/https/${npm_package_name}.pem\" --ssl-key \"$HOME/.aspnet/https/${npm_package_name}.key\"",
 //#else
     "start": "ng serve --port 5002",
 //#endif

I already created the PR dotnet/spa-templates#35 that fixes this problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant