Skip to content

ReactJS.NET has not been initialised correctly on Azure Web app #191

Closed
@chadangerer

Description

@chadangerer

I have an existing MVC website and am starting to convert some of the UI to react components. Locally everything is working fine.

When I deployed to azure I got the error message
ReactJS.NET has not been initialised correctly.;StackTrace: at React.Web.Mvc.HtmlHelperExtensions.get_Environment() at React.Web.Mvc.HtmlHelperExtensions.ReactInitJavaScript(HtmlHelper htmlHelper)

I am pretty much following the sample line for line.

I am using webpack to create a server and client bundle. Both are deployed.

My ReactConfig looks like this

ReactSiteConfiguration.Configuration.SetReuseJavaScriptEngines(false).SetLoadBabel(false) .AddScriptWithoutTransform("~/Scripts/build/server.bundle.js");

And this is added to my _DefaultLayout.cshtml.

@Html.ReactInitJavaScript()

Are there known issues with certain versions in Azure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions