Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Getting cannot read property 'create' of undefined on production build #8265


User avatar
0
huntethan89 created

Hi

I am getting an below error(Uncaught TypeError: Cannot read property 'create' of undefined) on Organization Unit page on production build

Detailed code as given below

Everything is working fine at local.Please look into the matter

Thanks in Advance


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Can you share the url of the production application? [email protected]

  • User Avatar
    0
    huntethan89 created

    Hi,

    I found something which is giving issue. The following code is not working on production application.

    This code is from Mpa/views/layout/_layout.cshtml.

    And this is MpaBundleConfig.cs code .

    Can you please give any help on this.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team

    Is your project's script and style content published under the website directory in your production environment?

    Such as

    /Common/Scripts
    /Areas/Mpa/Common/Scripts
    
  • User Avatar
    0
    huntethan89 created

    Yes

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @smartlayer

    Did you build scripts usign "npm run build" command for production ?

  • User Avatar
    0
    huntethan89 created

    No, I never used these scripts (npm run build) for production in other projects. Can you please provide me steps how to build scripts for production ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    @smartlayer

    Sorry, it seems like you are using MVC 5.x. Could you create this issue on https://github.com/aspnetzero/aspnet-zero repository and let us check and fix it.

    Thanks,

  • User Avatar
    0
    huntethan89 created

    Dear @ismcagdas

    Issue has been created on github as advised. please check https://github.com/aspnetzero/aspnet-zero/issues/697

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team