Azure 未找到反应组件
我正在asp.net core上制作一个React应用程序。我使用ReactJS.NET库和webpack作为jsx组件的绑定器和传输器 我让它在本地工作,但当我离开azure时,我会得到以下日志:Azure 未找到反应组件,azure,asp.net-core,reactjs.net,Azure,Asp.net Core,Reactjs.net,我正在asp.net core上制作一个React应用程序。我使用ReactJS.NET库和webpack作为jsx组件的绑定器和传输器 我让它在本地工作,但当我离开azure时,我会得到以下日志: An unhandled exception occurred while processing the request. ReactEngineNotFoundException: No usable JavaScript engine was found. Please install a
An unhandled exception occurred while processing the request.
ReactEngineNotFoundException: No usable JavaScript engine was found. Please
install a JavaScript engine such as React.JavaScriptEngine.ClearScriptV8 (on
Windows) or React.JavaScriptEngine.VroomJs (on Linux and Mac OS X). Refer to
the ReactJS.NET documentation for more details.
React.AspNet.HtmlHelperExtensions.get_Environment()
TinyIoCResolutionException: Unable to resolve type:
React.JavaScriptEngineFactory
React.AspNet.HtmlHelperExtensions.get_Environment()
TinyIoCResolutionException: Unable to resolve type: React.ReactEnvironment
React.AspNet.HtmlHelperExtensions.get_Environment()
ReactNotInitialisedException: ReactJS.NET has not been initialised correctly.
Please ensure you have called app.AddReact() and app.UseReact() in your
Startup.cs file.
React.AspNet.HtmlHelperExtensions.get_Environment()
在ReactJS.NET文档中,“从2.2版开始,ReactJS.NET在Azure中使用V8 JavaScript引擎进行开箱即用”。它在app.UseReact()上写着“.setAllowSieeEngine(false)”,但现在已经不推荐使用了
不确定要做什么:/
提前谢谢经过多次尝试,我终于成功了。找到一个github帖子 在核心部分安装了这些包,并将代码添加到startup.cs中,它在部署到azure后工作。V8套件和jurassic在Core上不起作用