---
title: "Troubleshooting"
slug: ovhcloud-design-system-troubleshooting
category: generic
type: overview
version: 20.0.0
tokens: 912
source: https://ovh.github.io/design-system/v20.0.0/llms/ovhcloud-design-system-troubleshooting.txt
---
# Troubleshooting
*Common issues met when integrating ODS, and how to fix them. If yours is not listed, check the [F.A.Q.](https://ovh.github.io/design-system/v20.0.0/guides/faq) or [open an issue on GitHub](https://github.com/ovh/design-system/issues).*
## TS2307: Cannot find module '@ovhcloud/ods-react' or its corresponding type declarations.
Check that you're using the `bundler` [module resolution](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#--moduleresolution-bundler) in your `tsconfig.json`.
```typescript
"moduleResolution": "bundler"
```
## My popover/tooltip is not displayed correctly
Check that you're not using a `Fragment` as your trigger.
The following will **not** work properly:
```tsx
<>
>
...
```
Replace the `Fragment` with an actual node:
```tsx
...
...
```
## Overlay elements are not displayed correctly in a drawer/modal
`Modal` and `Drawer` components have a `z-index` greater than other overlay components.
This is to prevent those to appear behind an open modal/drawer.
To allow overlay elements to correctly render inside a modal/drawer, add the `createPortal={ false }` attribute to the
`Content` component of the overlay element.
See [Drawer example](https://ovh.github.io/design-system/v20.0.0/components/drawer)
and [Modal example](https://ovh.github.io/design-system/v20.0.0/components/modal).
## Icons are not displayed
Ensure you did import the fonts in your application, check the [get started](https://ovh.github.io/design-system/v20.0.0/guides/get-started)
page to read more about how to achieve this.
## Warning: Function components cannot be given refs
With React 18, when using components enabling dynamic component (through the `as` attribute), you may encounter the following error message in the console:
```text
Warning: Function components cannot be given refs.
Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
```
This means you're passing a function component to the `as` attribute and it needs to be wrapped by a `forwardRef` to be able to manage the `ref` correctly.
With React 19, `ref` is a regular prop and no warning is shown, but your component still has to pass the `ref` it receives down to its DOM element, as the example below does.
```tsx
import { Link } from '@ovhcloud/ods-react';
import { forwardRef, useRef } from 'react';
const DummyLink = forwardRef(({ children, ...props }, ref) => {
return (
{ children }
);
});
const MyApp = () => {
const linkRef = useRef(null);
return (
...
...
);
};
```
## Error during server-side rendering (Next.js App Router)
ODS components rely on React state, effects and browser APIs, so they cannot render as React Server Components.
Use them from client components, marked with the `'use client'` directive, and keep the theme imports in your root layout.
If the error is `document is not defined` and the page renders a `Toaster`, it comes from its default portal into `document.body`: pass `createPortal={ false }`, or render the `Toaster` only once the page is mounted in the browser.
See [Get Started](https://ovh.github.io/design-system/v20.0.0/guides/get-started) for the full setup.