External asset of component (gif) should be positioned on the right folder.
External assest in wrong folder or path to asset (gif) is wrong.
I developed following component: https://bit.dev/nadzic/test/loader/~code (exported it with omg_loader.gif) and tried to reuse in another project. So when I reuse it, I get following error:

Because the omg_loader.gif is not in wanted folder. The folder structure looks like this:


Is there only an option to use relative links for resources or is there any option that we keep absolute urls? For both apps I tried to set app name ldmaapp.
It's a bug.
It happens when these three conditions met:
require('ldmaapp/assets/gif/omg_loader.gif')) in this case).As a workaround, you can change #2 or #3 and it should work. In other words, try one of the following:
.gif file with relative syntax. (something like require('../../assets/gif/omg_loader.gif')@davidfirst @GiladShoham Are you sure it is fixed?
I upgraded bit to 14.1.0, re-exported the component and reinstalled node_modules in the project where I want to use the component and still getting the following:


Here is the link to the component:
Maybe you can try to install it by yourself
@nadzic Thanks for the update, we will check it again and post an update soon
The issue is, in file node_modules/nadzic.test.loader/dist/src/components/common/Loader.js (after installing it via npm install) is always requring in the following way: source:require('ldmaapp/assets/gif/omg_loader.gif') - even if I set relative paths in component, as in example: https://bit.dev/nadzic/test/loader/~code.
It works if I change this line after npm install in the following: source:require('../../../assets/gif/omg_loader.gif')
@nadzic , the fix above was to get the module path (require('ldmaapp/assets/gif/omg_loader.gif')) working instead of the relative.
The relative syntax should work regardless of Bit because both files are in the same component, so Bit doesn't generate any link here.
I tried to install your component using NPM and in the dist I see the following:
source:require('../../../assets/gif/omg_loader.gif'), which looks good to me.
Where do you get the error above? maybe you can paste here a snippet I could run to get that error.
@davidfirst Hi!
I will try to reinstall node_modules, clean cache and will report you again here.
Got it working.
Looks like there was a problem with cache.
It works now with absolute and relative urls.
Thank you very much for your help!
Kinds,
Nik
Most helpful comment
Got it working.
Looks like there was a problem with cache.
It works now with absolute and relative urls.
Thank you very much for your help!
Kinds,
Nik