Custom tag already defined

I have a properties view that I am sharing between an add and an edit view. For my main component I import the various sub-components, e.g.:

customer.js:

import './views/properties';
import './add/';
import './edit/';

I then imported the properties view again from the add view:

add.js

import '../views/properties';

An error was logged to the console stating the the custom tag had already been defined. It seems as though the `/views/properties’ module was being loaded twice.

Does this have something to do with the path?

I refactored out the model to a separate file since that is the actual reusable bit that I’m interested in but it did seem strange that the module was loaded twice since modules are supposed to be singletons. The only reason that I can think of is that the path isn’t “normalized”… ideas?

my guess is that the same module is being loaded twice under different names.

Checkout System._traceData.

I refactored my code slightly to get it working and now I cannot reproduce the error.

I had the same suspicion but didn’t think to look at the trace data. I’ll have a look at the trace data the next time I run into this.