# Missing route context

Learn how to solve route context issues.

The following error occurs when you call a function that requires the route context outside of App routes:

> **Error**
>
> `someFunction()` requires specifying the `route` parameter outside app routes.

If you are using [Page router](https://nextjs.org/docs/pages) or [API routes](https://nextjs.org/docs/api-routes/introduction), you must manually provide the route context when calling the [`fetchContent`](/reference/sdk/nextjs/api/functions/fetch-content), [`evaluate`](/reference/sdk/nextjs/api/functions/evaluate), [`identify`](/reference/sdk/nextjs/api/functions/identify), and [`anonymize`](/reference/sdk/nextjs/api/functions/anonymize) functions. Check the documentation for examples on how to pass the route context for each function.

Note that the [`cql`](/reference/sdk/nextjs/api/functions/cql) function cannot be used outside of App routes. This is because `cql` is a tag function, which does not accept additional parameters, so it relies on the route context to work. Attempting to use it outside the App routes will result in the following error:

> **Error**
>
> `cql()` can only be used with App Router.

For similar functionality outside of App routes, use the [`evaluate`](/reference/sdk/nextjs/api/functions/evaluate) function instead.
