You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I want to push a component schema by using the push-components command
Current behavior:
if a component does not contain the fields
"internal_tags_list": [],
the push-components command will output this error:
- Executing push-components task
- Get presets from component Container
X An error occurred when load components file from api
X An error occurred when executing the push-components task: Cannot read properties of undefined (reading 'length')
it expects internal_tags_list to be present so it checks directly its length, hence the error
Expected behavior:
If internal_tags_list is not present in the the component schema file used as <SOURCE> of the push-components command, I should be able to push the component anyway, or at least I should be informed of this missing property in a clear, informative error message so that the developer can provide it where needed.
Maybe there could be a fix on the check being executed, such as the following
create a components.json file to use as the components schema to push to Storyblok, with a component that is missing the mentioned property. For example:
I seem to be getting a related error here where, if tags are populated on the source component and (presumably) the tag does not exist in the destination space the import for that component fails with a 422 Unprocessable entity
When I want to push a component schema by using the
push-components
commandCurrent behavior:
if a component does not contain the fields
the
push-components
command will output this error:And this happens because here
storyblok-cli/src/tasks/push-components.js
Line 181 in 82f4e28
it expects
internal_tags_list
to be present so it checks directly its length, hence the errorExpected behavior:
If
internal_tags_list
is not present in the the component schema file used as<SOURCE>
of thepush-components
command, I should be able to push the component anyway, or at least I should be informed of this missing property in a clear, informative error message so that the developer can provide it where needed.Maybe there could be a fix on the check being executed, such as the following
but this I'll leave it to you
Steps to reproduce:
components.json
file to use as the components schema to push to Storyblok, with a component that is missing the mentioned property. For example:push-components
command, for examplestoryblok push-components ./components.json --space <SPACE_ID>
The text was updated successfully, but these errors were encountered: