Base solution for your next web application
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

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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

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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    huntethan89 created

    Yes

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @smartlayer

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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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 ?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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,

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • 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

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)