---
title: "NUXT_E7008"
description: "callOnce fn must be a function."
canonical_url: "https://nuxt.com/docs/4.x/errors/e7008"
---
# E7008

`callOnce()` received a non-function `fn` argument. The value to run once must be a function so Nuxt can execute it a single time and skip it on subsequent calls.

## Resolution

```ts
await callOnce('setup', () => {
  // runs once
})
```

::read-more{to="https://nuxt.com/docs/4.x/api/utils/call-once"}
::


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
