Hello I am building an Angular/.Net Core project and creating the projects by following Microsoft's suggestion,
The error log does not contain more relevant information than the output. Notice how the Project starts with Leon\AppData\...
instead of C:\users\Eric Leon\...
and this is why I suspect the username is the problem, because it looks like its cutting of the path at the space in the username. I also looked at the aspnetcore-https.js which seems to be building the path and even replaced the baseFolder
with a hardcoded path with that contained in the name const baseFolder = 'C:/Users/Eric Leon/AppData/Roaming/ASP.NET\https'
.
After hours of looking at this I haven't had success so far so any help would be appreciated
CodePudding user response:
In package.json the start path for the .pem file and the .key file is specified.
"ng serve --ssl --ssl-cert %APPDATA%\\ASP.NET\\https..."
--ssl-cert should contain *C:\Users* and %APPDATA% should contain username\APPDATA\Roaming but in this case --ssl-cert included the first part of my username (firstname) and %APPDATA% started from the second part of the username (lastname). The solution was to put double quotes around %APPDATA% since command line tools only support double quotes and escape them with backslash since its in a json file.
so "ng serve --ssl --ssl-cert \"%APPDATA%\"\\ASP.NET\\https..."
Prior to that I was working around the issue by putting the files in a folder on the C drive and hardcoding the path.