# Fix 'resolver is not a function' in React

> How to fix the TypeError: resolver is not a function error in a Next.js or React app, which is caused by a missing default export that you need to restore.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2021-06-18 | Topics: [React](https://flaviocopes.com/tags/react/) | Canonical: https://flaviocopes.com/react-resolver-not-function/

I ran into this rather puzzling message while working on a [Next.js](https://flaviocopes.com/nextjs/)/[React](https://flaviocopes.com/react/) app:

> TypeError: resolver is not a function

Turned out the solution was very simple.

I was doing some editing and I commented out the default export to component of the API call I was editing:

```
export default <name>
```

So, make sure you have a default export and the error will go away.
