Skip to content

CLI upload calls nonexistent generateUploadUrls function #8

Description

@Dan-Cleary

Bug

The CLI upload command (npx @convex-dev/static-hosting upload) fails because it calls staticHosting:generateUploadUrls (plural), but the component only exposes generateUploadUrl (singular).

Version: 0.1.3

Error:

Could not find function for 'staticHosting:generateUploadUrls'. Did you forget to run `npx convex dev`?

Available functions:
• staticHosting:generateUploadUrl
• staticHosting:recordAsset
• staticHosting:gcOldAssets
• staticHosting:listAssets
• staticHosting:getCurrentDeployment

Source: dist/cli/upload.js line 175:

const urlsOutput = await convexRunAsync(`${componentName}:generateUploadUrls`, { count: storageFiles.length });

The component's lib.js only defines generateUploadUrl (singular, no count parameter). The CLI expects a batch function that doesn't exist.

Workaround: Call generateUploadUrl individually per file via a custom upload script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions