-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'getContentTypes' of undefined #105
Comments
@AlexandreVerhoye it seems you need to return space.getEnvironment("master") can you try this?
|
Hey, now I have this error :
|
@AlexandreVerhoye hmmm... can you try just this?
|
I'm getting this error :
They are the same credential I'm using to fetch data on my nextjs project |
Based on my experience (and another issue posted here), it seems like if you are trying to hide your info in an environment variable and then access them in the .getContentfulEvironment.js file then it doesn't work properly (I got the exact same error messages). Once I hard entered the token, space, and environment names into the file it worked perfectly. |
Hello ! First of all thanks for this package, It will be really useful to me 👍
I have this issue while trying to generate types. I created the getContentfulEnvironment in the root of the project like that :
then I just ran
npm run contentful-typescript-codegen
and I get this error :TypeError: Cannot read property 'getContentTypes' of undefined
Thanks and have a great day !
The text was updated successfully, but these errors were encountered: