Webpack dev middleware failed because of an error while loading 'aspnet-webpack'

When trying to debug .NET Core application/solution with VS Code I got the following error

Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException : Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'

When debugging the same .NET Core multiproject application/solution with Visual Studio for Mac debugging process worked without any errors.

When working with VS Code it is important that we set up launch.json correctly in our case

"program": "${workspaceRoot}/src/ProjectName/bin/Debug/netcoreapp2.0/ProjectName.dll",
"cwd": "${workspaceRoot}/src/ProjectNames/"

After this two values were set correctly debug process started without any problems.