This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Call to Node module failed with error: '...\ClientApp\dist\main-server' #363
Closed
Description
An unhandled exception has occurred: Call to Node module failed with error: Error: Cannot find module 'C:\Users\tmitchell\Downloads\Jav
aScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\ClientApp\dist\main-server'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at findBootModule (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet
-prerendering\Prerendering.js:98:24)
at findBootFunc (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet-p
rerendering\Prerendering.js:103:5)
at renderToString (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet
-prerendering\Prerendering.js:10:5)
at module.exports.renderToString (C:\Users\tmitchell\AppData\Local\Temp\tmp53F7.tmp:19:46)
at C:\Users\tmitchell\AppData\Local\Temp\tmp5408.tmp:113:19
at IncomingMessage.<anonymous> (C:\Users\tmitchell\AppData\Local\Temp\tmp5408.tmp:132:38)
System.Exception: Call to Node module failed with error: Error: Cannot find module 'C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaS
criptServices-dev\templates\ReactReduxSpa\ClientApp\dist\main-server'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at findBootModule (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet
-prerendering\Prerendering.js:98:24)
at findBootFunc (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet-p
rerendering\Prerendering.js:103:5)
at renderToString (C:\Users\tmitchell\Downloads\JavaScriptServices-dev\JavaScriptServices-dev\templates\ReactReduxSpa\node_modules\aspnet
-prerendering\Prerendering.js:10:5)
at module.exports.renderToString (C:\Users\tmitchell\AppData\Local\Temp\tmp53F7.tmp:19:46)
at C:\Users\tmitchell\AppData\Local\Temp\tmp5408.tmp:113:19
at IncomingMessage.<anonymous> (C:\Users\tmitchell\AppData\Local\Temp\tmp5408.tmp:132:38)
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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.SpaServices.Prerendering.PrerenderTagHelper.<ProcessAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AspNetCore._Views_Home_Index_cshtml.<ExecuteAsync>d__31.MoveNext() in /Views/Home/Index.cshtml:line 2
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<RenderPageAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<RenderAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<ExecuteAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultFilterAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAllResultFiltersAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResourceFilterAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()
I'm not sure at this time what's causing it. I'm going to do some more research and figure it out.
I'm using DotNetCore.1.0.1-VS2015Tools.Preview2.0.2.
I have the latest Node and npm installed.
Issue is line 5 of Views\Home\index.cshtml
Removing the asp-prerender-module="ClientApp/dist/main-server"
gives the following error in the js console.
http://localhost:5000/dist/main-client.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/site.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/vendor.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/main-client.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/site.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:5000/dist/vendor.css Failed to load resource: the server responded with a status of 404 (Not Found)
this means webpack is not bundling correctly, which leads me to conclude this is an issue with the webpack config. Still researching.
Metadata
Metadata
Assignees
Labels
No labels