Aljohn Yamaro
Aljohn Yamaro

Reputation: 2881

TypeError: Cannot read properties of undefined (reading 'createClient') in react + contentful

In my node project contentful is running same lines with my react project. But in react gives me an error, in the image below. I tried to reinstall again but it doesn't work. Did I miss something? Any help is highly appreciated.

enter image description here

Thank you

Upvotes: 1

Views: 2276

Answers (1)

aerials
aerials

Reputation: 51

import { createClient } from "contentful";

const contentfulClient = createClient({
  "your code"
});

Upvotes: 5

Related Questions