Deploy to Azure Cannot find module 'angular2-universal-polyfills' #1162

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

Originally created by @Gimly on 12/22/2016

Not quite sure if this is an error related to the template or not, but I've created a test app with the aspnetcore-spa yo template with Angular 2 and tried deploying it to Azure App Services.

I get the following error:

Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module 'angular2-universal-polyfills'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:87:19)
at __webpack_require__ (D:\home\site\wwwroot\ClientApp\dist\main-server.js:20:30)
at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:48:2)
at __webpack_require__ (D:\home\site\wwwroot\ClientApp\dist\main-server.js:20:30)
at D:\home\site\wwwroot\ClientApp\dist\main-server.js:40:18
at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:43:10)
Current directory is: D:\home\site\wwwroot

The code works fine in Visual Studio as well as locally and I'm not sure what I'm missing to make it work once published.

*Originally created by @Gimly on 12/22/2016* Not quite sure if this is an error related to the template or not, but I've created a test app with the aspnetcore-spa yo template with Angular 2 and tried deploying it to Azure App Services. I get the following error: ``` Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Cannot find module 'angular2-universal-polyfills' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:87:19) at __webpack_require__ (D:\home\site\wwwroot\ClientApp\dist\main-server.js:20:30) at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:48:2) at __webpack_require__ (D:\home\site\wwwroot\ClientApp\dist\main-server.js:20:30) at D:\home\site\wwwroot\ClientApp\dist\main-server.js:40:18 at Object.<anonymous> (D:\home\site\wwwroot\ClientApp\dist\main-server.js:43:10) Current directory is: D:\home\site\wwwroot ``` The code works fine in Visual Studio as well as locally and I'm not sure what I'm missing to make it work once published.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1162
No description provided.