# Browser showing error: unexpected token '\<'

**URL:** <https://discourse.gohugo.io/t/browser-showing-error-unexpected-token/21609>\
**Category:** support\
**Created:** [November 4, 2019, 6:28pm UTC](https://discourse.gohugo.io/t/browser-showing-error-unexpected-token/21609 "2019-11-04T18:28:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![synthtalk](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@synthtalk](https://discourse.gohugo.io/u/synthtalk)\
**Post date:** [November 4, 2019, 6:28pm UTC](https://discourse.gohugo.io/t/browser-showing-error-unexpected-token/21609/1 "2019-11-04T18:28:06Z")

</div>

Hi,

I’m working on my first hugo site and I’m getting an error I haven’t been able to figure out or find an answer to yet.

Chrome and Safari show the error Unexpected token: `<` in line one of Index which is

Looking around in chrome dev tools, it appears 2 index pages are loaded as shown in the screenshot. I’m guessing the error occurs when the browser see a second .

 ![Hugo%20unexpected%20token](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/9/9cc45b4e75a4c1b239d06d99bee38c08e90055f8.png)

I’m running the server locally using `hugo server -D` and have installed one theme “hugo-kross”. I’ve copied some templates from the theme layouts directory to the site layouts directory so I can make changes. There are 2 index pages, one for the theme and one copied and changed for my site

test-hugo/layouts/index.html  
test-hugo/themes/kross-hugo/layouts/index.html

Any suggestion on how to troubleshoot this problem?

Thank you.

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [November 5, 2019, 12:23am UTC](https://discourse.gohugo.io/t/browser-showing-error-unexpected-token/21609/2 "2019-11-05T00:23:53Z")

</div>

Hi,

> [@synthtalk](#):
>
> Any suggestion on how to troubleshoot this problem?

Have a look at [Requesting Help](https://discourse.gohugo.io/t/requesting-help/9132) to see how we can help you.

---

<div class="post-metadata">

**Author:** ![synthtalk](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@synthtalk](https://discourse.gohugo.io/u/synthtalk)\
**Post date:** [November 5, 2019, 7:36am UTC](https://discourse.gohugo.io/t/browser-showing-error-unexpected-token/21609/3 "2019-11-05T07:36:33Z")

</div>

@pointyfar Thank you for pointing me to the help doc. To provide more info, I created a new site and found the issue started after adding the kross-hugo theme. After a bit of troubleshooting, I found this code in the footer partial was causing the issue.

```auto
{{ "<!-- Google Map API -->" | safeHTML }}
<script src="{{ .Site.Params.gmapAPI | absURL }}"></script> 

```

I think the problem was due to the variable `.Site.Params.gmapAPI` not being set and the pipe to absURL generating “[http://localhost:1313/](http://localhost:1313/)” as the script source.

I’ve created an issue in the theme repo.
