Troubleshooting
Troubleshoot common errors during CMS schema generation, upload, and Admin access, including permission issues, FastStore CLI detection failures, and missing components in the section picker.
Troubleshoot common errors during CMS schema generation, upload, and Admin access.
Keywords: CMS, FastStore, CLI, schema, sync, content plugin
Developers may encounter the following errors when working with CMS schemas locally, particularly when running faststore cms-sync, vtex content generate-schema, or vtex content upload-schema.
| Error message | Possible cause | Solution |
|---|---|---|
Error: Permission denied | The user role doesn't have the required CMS permissions. | Grant user CMS access |
Could not detect the @faststore/cli version | The command is running outside the storefront project root, or the FastStore CLI package is not in package.json. | Fix FastStore CLI detection |
| Component doesn't appear in the section picker after upload | The store ID is mismatched, or the content type doesn't reference the component. | Fix missing component in section picker |
Solutions
Grant user CMS access
Use this path when the error is related to permissions in the CMS Admin or during schema upload.
- Open the VTEX Admin and go to Account Settings > User Roles.
- Select the role associated with the affected user.
- In Products and Resources, click CMS.
- Make sure the required CMS permissions are checked, including See CMS menu on the top-bar and Settings.
- In the Users section, confirm the user's email is added to the role.
- Click Save.
- Ask the user to run the sync command again and verify that the error no longer appears.
For more details on CMS permissions, see Roles - License Manager.
Fix FastStore CLI detection
Use this path when generate-schema exits with a message that it couldn't detect the FastStore CLI version.
Verify your working directory
- Open the terminal.
- Make sure you are in the root of your storefront project, the directory that contains
package.json. - Run the sync command again.
Pass the version manually
If the error persists after confirming your working directory, pass the base version flag explicitly:
_10vtex content generate-schema --base vtex.faststore@3
or
_10vtex content generate-schema --base vtex.faststore@4
Replace the version number with the FastStore major version your project uses.
Fix the missing component in the section picker
Use this path when the schema upload succeeds, but the new component does not appear in the CMS Admin section picker.
Verify the store ID
- Open the terminal output from the sync command.
- Check the store ID that was used during upload (e.g.,
cmsdev.faststore). - In the CMS Admin, confirm you are viewing a page that belongs to the same store.
- If the store IDs don't match, re-run the sync command and enter the correct store ID when prompted.
Check the content type configuration
- Navigate to the
cms/{storeId}/pages/directory in your project. - Open the content type file for the page where you expect the component to appear (e.g.,
cms_content_type__landingPage.jsonc). - Check the
sectionsproperty. It must either:- Reference
#/$defs/$ALLOW_ALL_COMPONENTSto allow all components, or - Explicitly list your component's
$componentKey.
- Reference
- If the content type does not reference your component, add it, then re-generate and re-upload the schema.
Re-sync after changes to pages
Any change to files in the pages/ directory requires a full re-sync. Run the sync command again after modifying content type definitions to ensure the CMS Admin reflects the updated configuration.