dotnet electronize start command throws errors when used with the react net core template on development #160

Closed
opened 2026-01-29 16:32:36 +00:00 by claunia · 1 comment
Owner

Originally created by @psimoesbits on GitHub (May 18, 2018).

Originally assigned to: @GregorBiswanger on GitHub.

First of all, congratulations for this great project.

The react net core template (dotnet new react) has a hot reloading feature that it is activated in the development environment using UseWebpackDevMiddleware

To activate this environment is needed to define this environment variable: SET ASPNETCORE_Environment=Development and configured like this:

            if (env.IsDevelopment ()) {
                app.UseDeveloperExceptionPage ();
                app.UseWebpackDevMiddleware (new WebpackDevMiddlewareOptions {
                    HotModuleReplacement = true,
                    ReactHotModuleReplacement = true
                });
            } else {
                app.UseExceptionHandler ("/Home/Error");
            }

It runs fine when running it with dotnet run, however, there is an error thrown when it is started with dotnet electronize start. I think the problem is related to the content root folder.

With dotnet run the content root folder is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI (project root)
With dotnet electronize start the content root folder is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin\ (executable folder)

stdout: Application startup exception: System.AggregateException: One or more errors occurred. (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:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
) ---> 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'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
   at Crypto.NetCore.GUI.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\Startup.cs:line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
---> (Inner Exception #0) 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'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()<---
stdout: crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
      Application startup exception
System.AggregateException: One or more errors occurred. (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:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
) ---> 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'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options)
   at Crypto.NetCore.GUI.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\Startup.cs:line 37
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
---> (Inner Exception #0) 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'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19)
    at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30)
    at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26)
    at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19
    at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38)
    at emitNone (events.js:106:13)
Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin
   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()<---
Originally created by @psimoesbits on GitHub (May 18, 2018). Originally assigned to: @GregorBiswanger on GitHub. First of all, **congratulations** for this great project. The react net core template (`dotnet new react`) has a hot reloading feature that it is activated in the development environment using `UseWebpackDevMiddleware` To activate this environment is needed to define this environment variable: `SET ASPNETCORE_Environment=Development` and configured like this: ``` if (env.IsDevelopment ()) { app.UseDeveloperExceptionPage (); app.UseWebpackDevMiddleware (new WebpackDevMiddlewareOptions { HotModuleReplacement = true, ReactHotModuleReplacement = true }); } else { app.UseExceptionHandler ("/Home/Error"); } ``` It runs fine when running it with `dotnet run`, however, there is an error thrown when it is started with `dotnet electronize start`. I think the problem is related to the content root folder. With `dotnet run` the content root folder is: `C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI` (project root) With `dotnet electronize start` the content root folder is: `C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin\` (executable folder) ``` stdout: Application startup exception: System.AggregateException: One or more errors occurred. (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:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin ) ---> 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' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options) at Crypto.NetCore.GUI.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\Startup.cs:line 37 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() ---> (Inner Exception #0) 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' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()<--- stdout: crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6] Application startup exception System.AggregateException: One or more errors occurred. (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:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin ) ---> 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' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.AspNetCore.Builder.WebpackDevMiddleware.UseWebpackDevMiddleware(IApplicationBuilder appBuilder, WebpackDevMiddlewareOptions options) at Crypto.NetCore.GUI.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\Startup.cs:line 37 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app) at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() ---> (Inner Exception #0) 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' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:83:19) at __webpack_require__ (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:20:30) at createWebpackDevServer (C:\Users\pedro\AppData\Local\Temp\gfzv5ctu.lmk:62:26) at C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:114:19 at IncomingMessage.<anonymous> (C:\Users\pedro\AppData\Local\Temp\tkane5n0.rag:133:38) at emitNone (events.js:106:13) Current directory is: C:\Users\pedro\Documents\Projects\crypto.experiments\Crypto.NetCore.GUI\obj\Host\bin at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()<--- ```
claunia added the question label 2026-01-29 16:32:36 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Sep 26, 2018):

Hello @pedrosimoes79
do you use the new .NET Core 2.1 version?

Best,
Gregor

@GregorBiswanger commented on GitHub (Sep 26, 2018): Hello @pedrosimoes79 do you use the new .NET Core 2.1 version? Best, Gregor
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#160