The provided space does not exist or you do not have access.
See original GitHub issueExpected Behavior
Run a migration js script with node
$ node ./migrate.js
I expected to ask a confirmation to run the migration.
Actual Behavior
The script tells me the space does not exists:
{ makeRequest: [Function: makeRequest],
application: 'contentful.migration-cli/0.10.0',
accessToken: <accessToken>,
spaceId: <spaceId>,
environmentId: 'develop' }
The provided space does not exist or you do not have access.
🚨 Migration unsuccessful
The object you see is the log of the context. Anyway, I can definitely confirm that the space exists, I used it before in both environments (master, develop). I tried also hardcoding “master” environmentId, but does not work anyway.
Steps to Reproduce
Here is my scripts:
- migrate.js
const runMigration = require('contentful-migration/built/bin/cli').default;
const pathJoin = require('path').join;
const options = require('./config/tcom/config.test.json');
function migrate() {
runMigration({
spaceId: options['space-id'],
environmentId: options['environment-id'],
accessToken: options['access-token'],
filePath: pathJoin(__dirname, 'migrations/3.13.0.js')
})
.then(() => console.log('Migration Done!'))
.catch((e) => console.error(e));
}
migrate();
- migrations/3.13.0.js
module.exports = async function (migration, context) {
const pack = migration.editContentType('pack');
pack.createField('servicesDescription', {
name: 'Services Description',
type: 'Text'
});
console.log(context);
};
Environment
- Node Version: 8.11.3
- Package Manager Version: 5.6.0
- Operating System: Windows 10 64-bit
- Package Version: contentful-migration v0.10.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Solved: Others can not access my page. getting page does n...
Go to space space settings -> permissions. And make sure that these users are granted the view permission either directly or via a...
Read more >Cannot find the object because it does not exist or you do not ...
I've been trying to copy a table from PROD to DEV but get an error: "Cannot find the object X because it does...
Read more >Troubleshooting common SPMT issues and errors
In this article, you'll learn how to troubleshoot common errors in the SharePoint Migration Tool (SPMT).
Read more >Troubleshooting AWS Cloud9
Cause: The user that you signed in to the AWS Cloud9 console with doesn't have the correct AWS access permissions to perform the...
Read more >GraphQL Content API - Contentful
The token must have access to the space and environment you're targeting. ... Unlike the CDA, the GraphQL Content API does not support...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please fix your docs because you everywhere refer “Personal Management Key” as “Access Key”. There are 3 access keys in CF - Delivery, preview and personal management…
Hi @nicco91, There is nothing new implemented, it is impossible to use the delivery token which is read-only with the migration tool in all of the versions because it requires to do write operation thus it need always the management token. I think there might a confusion in your side
Best, Khaled