# Error using first: both limit and seq must be provided

**URL:** <https://discourse.gohugo.io/t/error-using-first-both-limit-and-seq-must-be-provided/11704>\
**Category:** support\
**Created:** [April 25, 2018, 9:29am UTC](https://discourse.gohugo.io/t/error-using-first-both-limit-and-seq-must-be-provided/11704 "2018-04-25T09:29:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [April 25, 2018, 10:48am UTC](https://discourse.gohugo.io/t/error-using-first-both-limit-and-seq-must-be-provided/11704/3 "2018-04-25T10:48:47Z")

</div>

> [@RickCogley](#):
>
> {{ range first 5 .Site.Taxonomies.series.top1 }}

Try using `with` here:

```auto
{{ with .Site.Taxonomies.series.top1 }}
    {{ range first 5 . }}
        ...
    {{ end }}
{{ end }}

```

The error is for the cases you said where `series` front-matter is absent… so the `first` was seeing the second argument as _nil_ in those cases.

---

_[View the full topic](https://discourse.gohugo.io/t/error-using-first-both-limit-and-seq-must-be-provided/11704)._
