Try our conversational search powered by Generative AI!

Component ClientResources Path



I have been banging my head against the wall for a while now trying to figure out what I am doing wrong here. I am trying to package my dashboard component, but when I try to reference the dojo script, it throws a 404 because it is looking in the ~/Episerver/Shell/{version}/ folder instead of my packaged component folder. Looking at the component package it all seems to be structured correctly in ~/modules/_protected/{package_name}. I am assuming its something I am doing wrong with my module.config but I can't seem to narrow it down.

<?xml version="1.0" encoding="utf-8"?>
<module productName="componentName" clientResourceRelativePath="1.0.9" loadFromBin="false" tags="EPiServerModulePackage">
    <add assembly="company.componentName" />

      <add name="componentName" path="ClientResources/Scripts" />

      <add dependency="Shell" />
      <add dependency="CMS" />

Can anyone point me in the right direction?


May 10, 2019 21:25

I think you may need to define your resources in a clientResources node in the module.config -

May 13, 2019 17:22

Hi David,

Did you figure this out? I'm interested because I noticed somebody found a bug on a package I created a while back that looks exactly like this ( Haven't dug into it, but I tested in Episerver 10 and 11 before I released itso kinda strange.

May 14, 2019 0:55

Hey Jake,

I did find out what it was. Having it in the _protected folder, I forgot to make sure autodiscovery for <protectedModules> in the web.config was set to Modules. So it was never scanning it for my component. I found another post about it here. Not sure if thats the issue you were having, but it resolved it for me.


May 21, 2019 1:32

I was looking into a similiar issue in an upgraded project where EPiServer.Forms didn't run correctly after installing. Got 404 errors from a couple of JS references and some more problems.

I removed all traces of EPiServer.Packaging and also found this config pointing to the old Modules setup.

<add virtualPath="~/EPiServer/"
type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework.AspNet" />

Replaced it with:

<add name="ProtectedModules" virtualPath="~/EPiServer/" physicalPath="Modules\_Protected" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework.AspNet" />

Sep 04, 2019 7:53
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.