get-convex / get-convex/static-hosting
CLI upload calls nonexistent generateUploadUrls function
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
## 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:
```js
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.
Contributor guide
Assessment
This issue has not been assessed yet.