Getting error about duplicate template definitions in file with a single template definition, Google closure templates

StackOverflow https://stackoverflow.com/questions/7669993

  •  07-02-2021
  •  | 
  •  

Domanda

I'm using google closure templates in java. I'm getting the following error when using the SoyFileSet builder to compile my templates to a single java object (I have many template files which I compile to a java object):

com.google.template.soy.base.SoySyntaxException: Found two definitions for template name 'namespace.qualifier.templateName', both in the file /templates/namespace/qualifier/TemplateName.soy.

The problem with this error is - for the template it is complaining about - I only have a single template defined in that file. Also, I did a file search through all of my template files to verify that was the only template I had by that name.

Anyone have any idea what my issue is?

È stato utile?

Soluzione

The problem was I was adding the same template to the SoyFileSet builder twice.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top