canvas-component-upload

Before uploading, confirm the user has Drupal Canvas CLI installed and configured for their target site.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "canvas-component-upload" with this command: npx skills add acquia/nebula/acquia-nebula-canvas-component-upload

Upload to Canvas

Before uploading, confirm the user has Drupal Canvas CLI installed and configured for their target site.

Setup gate

Before running any upload command:

Run upload

When component work is complete and validated, ask the user if they would like to upload the modified components to Canvas. Make sure to use the right package manager. For example, if using npm, run the following command:

npx canvas upload -c component1,component2,component3 -y

Replace component1,component2,component3 with the actual component names that were created or modified (e.g., canvas upload -c button,card,hero ).

Handling upload failures

Default behavior: always retry failed uploads unless the error is clearly a connection/setup failure.

Retry uploads when the failure indicates the Canvas app connection is already working (for example, dependency/order-related component errors). Do not retry connection/setup failures.

Connection/setup failures: Stop, do not retry

If upload fails with authentication, authorization, or network/connection errors, stop and ask the user to complete or verify setup first. This includes errors like invalid credentials, unauthorized/forbidden responses, DNS issues, connection refused, host unreachable, request timeout before reaching Canvas, or TLS/SSL handshake/certificate failures.

Point the user to the official setup docs:

Ask them to verify and update .env values (CANVAS_SITE_URL , CANVAS_CLIENT_ID , CANVAS_CLIENT_SECRET ) and OAuth/CLI setup, then retry the upload only after they confirm setup updates are complete.

Dependency-related failures

When uploading multiple new components where one component depends on another (e.g., hero imports heading ), the upload may fail with a message indicating that a component doesn't exist. This happens when a component that includes another gets uploaded before its dependency.

This is expected behavior. Simply retry the upload command. On subsequent attempts, the dependencies that were successfully uploaded in the previous run will already exist, allowing the dependent components to upload successfully.

Example scenario:

  • First upload attempt: hero fails because heading doesn't exist yet, but heading uploads successfully.

  • Second upload attempt: hero now succeeds because heading exists.

If uploads continue to fail after multiple retries, check that all dependency components are included in the upload command.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

canvas-component-metadata

No summary provided by upstream source.

Repository SourceNeeds Review
General

canvas-component-utils

No summary provided by upstream source.

Repository SourceNeeds Review
General

canvas-styling-conventions

No summary provided by upstream source.

Repository SourceNeeds Review