Prerendering errors #1414

Closed
opened 2025-08-09 17:20:03 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @Knaackee on 8/27/2016

Ive create a ReactRedux application using the generator-aspnetcore-spa. If i run the app and go to localhost:5000 i get

Error.
An error occurred while processing your request.

in the Browser and a lot of typescript errors like

// ...
// tons of TypeScript errors
// ...

ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts
(2,22): error TS2307: Cannot find module 'url'.

ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts
(3,23): error TS2307: Cannot find module 'path'.

ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts
(140,89): error TS2305: Module ''domain'' has no exported member 'Domain'.
    at /Users/dknaack/Development/MyApp/node_modules/aspnet-webpack/LoadViaWebpack.js:84:31
    at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:194:14)
    at Compiler.emitRecords (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:282:37)
    at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:187:11)
    at /Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:275:11
    at Compiler.applyPluginsAsync (/Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
    at Compiler.afterEmit (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:272:8)
    at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:267:14)
    at /Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/async/lib/async.js:52:16
    at Object.async.forEachOf.async.eachOf (/Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/async/lib/async.js:236:30)
   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__12`1.MoveNext()

in the console.

So, the prerendering does not work on my machine.

Any ideas on how to fix this ?

*Originally created by @Knaackee on 8/27/2016* Ive create a ReactRedux application using the generator-aspnetcore-spa. If i run the app and go to localhost:5000 i get ``` Error. An error occurred while processing your request. ``` in the Browser and a lot of typescript errors like ``` // ... // tons of TypeScript errors // ... ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts (2,22): error TS2307: Cannot find module 'url'. ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts (3,23): error TS2307: Cannot find module 'path'. ERROR in /Users/dknaack/Development/MyApp/bin/Debug/netcoreapp1.0/publish/node_modules/aspnet-prerendering/src/Prerendering.ts (140,89): error TS2305: Module ''domain'' has no exported member 'Domain'. at /Users/dknaack/Development/MyApp/node_modules/aspnet-webpack/LoadViaWebpack.js:84:31 at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:194:14) at Compiler.emitRecords (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:282:37) at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:187:11) at /Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:275:11 at Compiler.applyPluginsAsync (/Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69) at Compiler.afterEmit (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:272:8) at Compiler.<anonymous> (/Users/dknaack/Development/MyApp/node_modules/webpack/lib/Compiler.js:267:14) at /Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/async/lib/async.js:52:16 at Object.async.forEachOf.async.eachOf (/Users/dknaack/Development/MyApp/node_modules/webpack/node_modules/async/lib/async.js:236:30) 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__12`1.MoveNext() ``` in the console. So, the prerendering does not work on my machine. Any ideas on how to fix this ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1414
No description provided.