Closed yeshwanth-t closed 8 months ago
Hello!
Try to re-read the “Registration of JS engines” section of documentation.
Thanks @Taritsyn . All those registrations are already in place in my web application. Is there any breaking changes from 3.1.0 to 3.21.0?
JavaScriptEngineSwitcher.Core.JsEngineNotFoundException: Could not find a factory, that creates an instance of the JavaScript engine with name
ChakraCoreJsEngine
.
This error message means that JS engine has not been registered. Check your the Global.asax.cs
file there should be the following line of code:
JsEngineSwitcherConfig.Configure(JsEngineSwitcher.Current);
JsEngineSwitcher
I do have the below code in my Global.asax.cs
public override void Application_Start(object sender, EventArgs e)
{
IdentityModelEventSource.ShowPII = true;
JsEngineSwitcherConfig.Configure((JsEngineSwitcher)JsEngineSwitcher.Current);
}
JsEngineSwitcherConfig.Configure((JsEngineSwitcher)JsEngineSwitcher.Current);
Why are you doing a type conversion? It seems that you have incorrectly migrated from version 2.X to 3.X (see the “How to upgrade applications to version 3.X” section of documentation).
I am working with @yeshwanth-t. We have 2 workstations already running using the typecasting above. Without the typecast, we receive this error: cannot convert from 'JavaScriptEngineSwitcher.Core.IJsEngineSwitcher' to 'JavaScriptEngineSwitcher.Core.JsEngineSwitcher'
@B-Ahdoot, As far as I understand, you control contents of the App_Start/JsEngineSwitcherConfig.cs
file yourself. Just change argument type of the Configure
method to the IJsEngineSwitcher
and you won't need type conversion.
To avoid the error described by @yeshwanth-t, you need to ensure that the JsEngineSwitcherConfig.Configure
method is called before calling the BundleConfig.RegisterBundles
method. As an example, you can look at the BundleTransformer.Sample.AspNet45.Mvc4 demo project (pay special attention to the App_Start/JsEngineSwitcherConfig.cs
and Global.asax.cs
files).
@Taritsyn Thank you. The above two suggestions worked great and I am able to resolve those errors. Once again thank you for actively supporting us!!
Hi,
I have been using v3.1.0 for quite long time and this was working well. Now, I upgraded to v3.21.0 and getting the below error. JavaScriptEngineSwitcher.Core.JsEngineNotFoundException: Could not find a factory, that creates an instance of the JavaScript engine with name
ChakraCoreJsEngine
.The below is the versions list that I got installed.
I tried to rollback to older version but still the error occurs. Is there anything that got changed? More detailed explanation in below link. https://sitecore.stackexchange.com/questions/36568/bundletransformer-assettranslationexception-could-not-find-factory