Base solution for your next web application
Open Closed

Publish to Azure #3699


User avatar
0
rvanwoezik created

I finally migrated my ASP.NET 5.x & Angularjs 1.x to ASP.NET CORE & Angular and it is working on my machine ;-) When i try to publish it to Azure (merge project) from Visual Studio I'm getting an error:

The command "ng build --prod" exited with code 9009. PhoogleZero.Web.Host C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host\PhoogleZero.Web.Host.csproj 76

Any instructions or tips how to publish to Azure?


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    ng build prod is more sensetive than ng serve command. So, if you open a command promt and navigate to "C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host" and then run "ng build --prod", it will show you what the problem is with your angular app more clearly.

    Thanks.

  • User Avatar
    0
    rvanwoezik created

    ==== JS stack trace =========================================

    Security context: 0000016A7C53FA99 <JS Object> 1: DoJoin(aka DoJoin) [native array.js:~129] [pc=00000392D3C46E52] (this=0000016A7C504241 0589 <JS Array[260]>,x=260,N=0000016A7C504281 <true>,J=0000016A7C593339 <String[1]: \n>,I=000 ConvertToString (SharedFunctionInfo 0000016A7C55DBC9)>) 2: Join(aka Join) [native array.js:180] [pc=00000392C9183FF2] (this=0000016A7C504241 <unde

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory PS C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host>

  • User Avatar
    0
    alper created
    Support Team

    hi,

    it looks like nodejs cannot parse a huge script thus throws memory exception. i recommend you to follow the solutions on these topics and let me know if it helps

    <a class="postlink" href="https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory">https://stackoverflow.com/questions/385 ... -of-memory</a> <a class="postlink" href="https://stackoverflow.com/questions/26094420/fatal-error-call-and-retry-last-allocation-failed-process-out-of-memory">https://stackoverflow.com/questions/260 ... -of-memory</a>

  • User Avatar
    0
    rvanwoezik created

    Hi,

    Increased memory with following command: node --max_old_space_size=16384 (./node_modules/.bin/ng build --prod)

    C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host> node --max_old_space_size=16384 (./node_modules/.bin/ng build --prod) 24% building modules 123/123 modules 0 activeTemplate parse warnings: The <template> element is deprecated. Use <ng-template> instead (" [WARNING ->]<template [ngIf]="!isClosed">

    Error: Cannot find module 'C:\Users\Rene\Documents\Visual Studio 2017\Projects\aspnet-core\src\PhoogleZero.Web.Host\Date: 2017-08-14T10:05:36.248Z' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3

  • User Avatar
    0
    ismcagdas created
    Support Team

    It seems like this issue is resolved <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/376">https://github.com/aspnetzero/aspnet-ze ... issues/376</a>.