Created a new app and used the dotnet cli to prepare the application for deployment within a Docker container or FTP to Azure App Service (Linux)
Create generator to scaffold VS2017 version (.csproj)
run publish command to prepare app for deploy to production
dotnet publish -o app -c Release
cd app
dotnet myapp.dll
Unhandled Exception: System.AggregateException: One or more errors occurred. (Call to Node module failed with error: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:83:19)
at __webpack_require__ (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:20:30)
at createWebpackDevServer (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:62:26)
at /private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpbXKtMq.tmp:113:19
at IncomingMessage.<anonymous> (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpbXKtMq.tmp:132:38)
at emitNone (events.js:86:13)
Current directory is: /app) ---> System.Exception: Call to Node module failed with error: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:83:19)
at __webpack_require__ (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:20:30)
at createWebpackDevServer (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpQm4YDb.tmp:62:26)
at /private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpbXKtMq.tmp:113:19
at IncomingMessage.<anonymous> (/private/var/folders/gj/1mgg_4jx7mbdqbhw1kgcpcjr0000gn/T/tmpbXKtMq.tmp:132:38)
at emitNone (events.js:86:13)
Current directory is: /app
at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
ASPNETCORE_ENVIRONMENT was set to Development
Thank you #spboyer That was it!
Most helpful comment
ASPNETCORE_ENVIRONMENT was set to
Development