I have tried to launch in VS Code my SPA project (Angular 4 + ASP.NET) and I am getting errors. This errors are cause by:
// Add JavaScript services.
services.AddNodeServices(options => {
// https://github.com/aspnet/JavaScriptServices/tree/dev/src/Microsoft.AspNetCore.SpaServices#debugging-your-javascripttypescript-code-when-it-runs-on-the-server
options.LaunchWithDebugging = true;
options.DebuggingPort = 9229;
});
This options should enable debugging my javascript/typscript code while it is prerendered on the server. But the problem is that this configuration is deprecated.

It means that I should use node --inspect instead of node --debug But how can I achieve this in VS Code, or ASP.NET Core project to force that dotnet run command will start appropriate node debugging mode.
This issue is caused by change in Node.js between versions 4.x and later. The required changes or modifications to fix this issue are already done for NodeServices package which is compatible with .Net Core 2.0 (Fix is not available for .Net Core 1.0)
So following are the available options
Downgrade to Node 4.x which doesn't exhibit this problem Or
upgrade to ASP.NET Core 2.0 Preview 2, which includes the latest version of NodeServices in which this issue is fixed.
Thanks to Steve for clarifying in below thread https://github.com/aspnet/JavaScriptServices/issues/1084#issuecomment-313083926
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With