Visual Studio 2015: angular 2 template loading glitch #1285

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

Originally created by @EduardTheThird on 10/31/2016

When using Visual Studio 2015 as an IDE, the following exception occurs when starting the project for the first time using the green "IIS Express" start debug button: debug

The exception is as follows:

An unhandled exception occurred while processing the request. Exception: Call to Node module failed with error: Error: Cannot find module 'C:\Project\ClientApp\dist\main-server' 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 findBootModule (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:98:24) at findBootFunc (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:103:5) at renderToString (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:10:5) at module.exports.renderToString (C:\Users\myuser\AppData\Local\Temp\tmpA8C3.tmp:19:46) at C:\Users\myuser\AppData\Local\Temp\tmpA8C4.tmp:113:19 at IncomingMessage.<anonymous> (C:\Users\myuser\AppData\Local\Temp\tmpA8C4.tmp:132:38)

I believe this is due to Visual Studio 2015 opening the application in the browser before prerendering or Webpack is ready, as waiting for a few minutes and reloading the page clears the error and the application works beautifully.

The template works great with VS2015, thanks! 👍

*Originally created by @EduardTheThird on 10/31/2016* When using Visual Studio 2015 as an IDE, the following exception occurs when starting the project for the first time using the green "IIS Express" start debug button: ![debug](https://cloud.githubusercontent.com/assets/6488837/19849655/1b0acbe8-9f5d-11e6-9b55-5dd8e315f250.PNG) The exception is as follows: `An unhandled exception occurred while processing the request. Exception: Call to Node module failed with error: Error: Cannot find module 'C:\Project\ClientApp\dist\main-server' 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 findBootModule (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:98:24) at findBootFunc (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:103:5) at renderToString (C:\Project\node_modules\aspnet-prerendering\Prerendering.js:10:5) at module.exports.renderToString (C:\Users\myuser\AppData\Local\Temp\tmpA8C3.tmp:19:46) at C:\Users\myuser\AppData\Local\Temp\tmpA8C4.tmp:113:19 at IncomingMessage.<anonymous> (C:\Users\myuser\AppData\Local\Temp\tmpA8C4.tmp:132:38)` I believe this is due to Visual Studio 2015 opening the application in the browser before prerendering or Webpack is ready, as waiting for a few minutes and reloading the page clears the error and the application works beautifully. The template works great with VS2015, thanks! 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1285
No description provided.