Closed AnassL closed 6 years ago
This is the case for all angular apps from version 4.x and above (I don't recall the exact version). You have a property you're referencing from the template and you need to remove the private access modifier from it. Are you experiencing this from a vanilla installation?
Support requests are better discussed from the support forum. And github issues for bug reports.
I just tried a new vanilla installation, and this issue don't happen, so as you said I need to find the private access causing that. Thank you.
@Sami-L This is indeed having issue. So, I published them separately.
Removed this code from QuickApp.csproj
`
<Exec Command="npm install" />
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />
<Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="wwwroot\dist\**; ClientApp\dist\**" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
` Then run the following commands:
@codestellar thanks for the workaround,
I copied the ~\bin\release\win10-x64 folder content and the wwwroot folder to the hosting folder, but got the following error: HTTP Error 502.5 - Process Failure
@Sami-L Make sure that you have installed ASPNet Core module. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?tabs=aspnetcore2x
Figured it out,
Visual Studio 2017 doesn't detect all TypeScript errors, thanks to this link I could find an error in code using the command
node node_modules/webpack/bin/webpack.js --env.prod
fixed the error, then the project published normally.
@Sami-L I would recommend using VSCode strongly specially for front end development. :) The command line gives clear errors :)
@codestellar I agree, thank you, now I have to check errors also with VSCode, since VS 2017 keeps needed for Backend tasks.
Publishing with Visual Studio 2017 give the following error:
Severity Code Description Project File Line Suppression State Error: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2.
QuickApp C:\Projects\QuickApp\src\QuickApp\QuickApp.csproj 62
This is related to AOT compilation of Angular, and I read some explanations here.
Could someone confirm that this is the case here ?
If so where specifically apply the changes ?
I am using: Angular version: 5.1.1 tried also with 5.1.0 (same error) Browser: [all] Language: [TypeScript 2.6.2] Node (for AoT issues): node --version = 8.9.3 (LTS) npm --version = 5.5.1