We are using Unity for the dependency injection overriding the default behavior for the sitecore project. While deploying the jss
app, I am getting below error:
The current type, Sitecore.JavaScriptServices.AppServices.Pipelines.Import.IImportPipeline, is an interface and cannot be constructed. Are you missing a type mapping?
when I try to resolve the dependency by registering the types by using below code, it leads to other errors which I am not sure is the right approach or not.
How can I resolve the dependencies for types used in Sitecore assemblies for successful deploying the app using Unity
dependency injection?
container.RegisterTypes(
AllClasses.FromAssemblies(new[]
{
Assembly.Load("Sitecore.JavaScriptServices.AppServices"),
}),
WithMappings.FromMatchingInterface,
WithName.Default, WithLifetime.PerResolve, null, true);
Thanks, Hashmat