docs: added troubleshooting section for medusa-react (#4639)

This commit is contained in:
Shahed Nasser
2023-07-31 12:30:13 +03:00
committed by GitHub
parent 90dea3bfcf
commit 8321925404

View File

@@ -80,6 +80,26 @@ In the example above, you wrap the `Storefront` component with the `MedusaProvid
The `Storefront` component and its child components can now use hooks exposed by Medusa React.
### Troubleshooting: Could not find a declaration file for module 'medusa-react'
If you import `medusa-react` in your code and see the following TypeScript error:
```bash
Could not find a declaration file for module 'medusa-react'
```
Make sure to set `moduleResolution` in your `tsconfig.json` to `nodenext` or `node`:
```json title=tsconfig.json
{
"compilerOptions": {
"moduleResolution": "nodenext",
// ...
},
// ...
}
```
### MedusaProvider Optional Props
You can also pass the following props to Medusa Provider: