I have this project https://github.com/damirkusar/AngularMeetsNetCore/tree/AngularRc4 with Angular 4 RC.4 and .net kernel. I updated it from beta 8, removed the universal stuff. I work without pre-rendering, but not with pre-rendering enabled.
If you enable pre-rendering in this project under: WebApp / Views / Home / Index.cshtml
adding this to the application element
asp-prerender-module="ClientApp/dist/main-server"
so that it looks like this:
<app asp-prerender-module="ClientApp/dist/main-server">
<div class='custom-modal' style="background: white">
<div class="loader absolut-center"></div>
</div>
</app>
I get the following error:
Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module '@angular/animations/browser'
at new Error (native)
at Function.Module._resolveFilename (module.js:469:15) [<root>]
at Function.Module._load (module.js:417:25) [<root>]
at Module.require (module.js:497:17) [<root>]
at require (internal/module.js:20:19) [<root>]
at Object.<anonymous> (C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:766:18) [<root>]
at __webpack_require__ (C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:20:30) [<root>]
at Object.<anonymous> (C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:2088:1) [<root>]
at __webpack_require__ (C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:20:30) [<root>]
at C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:66:18 [<root>]
at Object.<anonymous> (C:\Users\damir\Code\AngularMeetsNetCore\WebApp\ClientApp\dist\main-server.js:69:10) [<root>]
at Module._compile (module.js:570:32) [<root>]
at Object.Module._extensions..js (module.js:579:10) [<root>]
at Module.load (module.js:487:32) [<root>]
Where should I add that @ angular / animation / browser to work in SSR again?
damir source
share