Getting "TypeError: Cannot read properties of undefined (reading 'indexOf')"
Closed this issue · 2 comments
PSMJonas commented
I have installed the module and am trying to integrate it into my project. Unfortunately, as soon as I wrap my components in the CloudimageProvider, I get an error.
I have removed the "Component" component for testing purposes, but still get the error:
import CloudimageProvider from 'next-cloudimage-responsive'
export default function App({ Component, pageProps }) {
const cloudimageConfig = {
token: process.env.cloudimageToken,
baseURL: process.env.cloudimageUrl,
};
return (
<CloudimageProvider config={cloudimageConfig}>
</CloudimageProvider>
)
}
I'm usind Next.js Version 13.4.5
PSMJonas commented
Fixed! Your readme on GitHub ist wrong:
import CloudimageProvider from ' next-cloudimage-responsive';
It has do be:
import { CloudimageProvider } from "next-cloudimage-responsive";