Closed amandasage closed 3 years ago
Oops. Late to the party :) Good!
BUT HOW? Please share your solution the next time, because I have the same issue and need to solve it 😉
BUT HOW? Please share your solution the next time, because I have the same issue and need to solve it 😉
My guess is that credentials are incorrect.
Depending on the type of keys you have (management or distribution), can you please debug import-distribution.js
and import-management.js
to see if client.getSpace(spaceId)
returns anything valid and spaceId
is set properly?
I just figured out it works with the CMA Token, but doesn't seem to work with my CDA Token.
With the CDA Token, client.getSpace()
returns me an object like this:
{
sys: { type: 'Space', id: 'XXX' },
name: 'XXX',
locales: [ { code: 'de', default: true, name: 'German', fallbackCode: null } ]
}
huh! that might be a problem indeed. Checked documentation, it doesn't have getEnvironment()
function anymore.
For now I would recommend using CMA way.. will check if this is something that can be fixed, or CDA is no longer suitable for this kind of metadata fetching
@Swissbite fixed this issue, PR merged. Thanks!
Hey lotas,
I'm having a Contentful user running into the attached error after following the instructions on the plugin page space.GetEnvironment is not a function.
Thank you!
Update: Was able to resolve