我正在 asp.net 核心上制作一个 React 应用程序。我使用 ReactJS.NET 库和 webpack 作为 jsx 组件的捆绑器和转译器。
我让它在本地工作,但是当我部署到天蓝色时,我得到了这个日志:
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 Docs,“从 2.2 版开始,ReactJS.NET 使用 V8 JavaScript 引擎在 Azure 中开箱即用”。它说“.SetAllowMsieEngine(false); on app.UseReact()”,但现在已弃用...
不知道该怎么做:/提前谢谢