windmill-labs/windmill · error
raw app ${ref.path} has no compiled bundle — deploy it first
Error message
raw app ${ref.path} has no compiled bundle — deploy it first What it means
When exporting a raw app to the Hub, the session fetches the app's compiled JS bundle at /api/w/<workspace>/apps/get_data/v/<secret>.js. A non-OK response means the raw app has never been deployed (no compiled bundle exists), and deploying an app without a bundle to the Hub would ship an empty/broken artifact, so it throws this error.
Source
Thrown at frontend/src/lib/components/workspaceSettings/deployToHubSession.svelte.ts:771
)
if (isModern) {
const a = await AppService.getAppByPath({ workspace, path: ref.path })
const secret = await AppService.getPublicSecretOfLatestVersionOfApp({
workspace,
path: ref.path
})
// The compiled JS bundle is required; a missing one means the app
// was never built/deployed, so fail loudly instead of pushing a blank app.
const [jsRes, cssRes] = await Promise.all([
fetch(`/api/w/${workspace}/apps/get_data/v/${secret}.js`, {
credentials: 'include'
}),
fetch(`/api/w/${workspace}/apps/get_data/v/${secret}.css`, {
credentials: 'include'
})
])
if (!jsRes.ok) {
throw new Error(`raw app ${ref.path} has no compiled bundle — deploy it first`)
}
const js = await jsRes.text()
const css = cssRes.ok ? await cssRes.text() : ''
const v: any = a.value ?? {}
const content = JSON.stringify({
files: { ...(v.files ?? {}), '/bundle.js': js, '/bundle.css': css },
runnables: v.runnables ?? {},
// Preserve the full-code app's explicit data table declaration so it
// survives publish/import and feeds migration detection.
...(v.data !== undefined ? { data: v.data } : {}),
...(v.datatables !== undefined ? { datatables: v.datatables } : {})
})
return { kind: 'raw_app', path: ref.path, summary: a.summary, content }
}
const r = await fetch(`/api/w/${workspace}/raw_apps/get_data/0/${ref.path}`, {
credentials: 'include'
})
if (!r.ok) return undefinedView on GitHub (pinned to e474e8803c)
Solutions
- Deploy the raw app first (Deploy button / push the app), then retry the Hub export
- Verify ref.path points to the app's deployed path in the correct workspace
- Check you have permission to read the app's compiled assets in that workspace
Example fix
// before await session.exportToHub(ref) // app never deployed // after await deployApp(workspace, ref.path) // ensures compiled bundle exists await session.exportToHub(ref)
Defensive patterns
Strategy: validation
Validate before calling
const app = await AppService.getApp({ workspace, path: ref.path })
if (!app || app.no_version) throw new Error(`Deploy ${ref.path} before exporting to Hub`) Try / catch
try {
await session.exportToHub(ref)
} catch (e) {
if (String(e.message).includes('has no compiled bundle')) {
// trigger app deployment, then retry the export
}
} Prevention
- Always deploy raw apps before exporting them to the Hub
- Validate app references point at live, deployed paths in the current workspace
- Add a pre-export check for a compiled bundle in automation that batch-exports apps
When it happens
Trigger: saveApp/raw-app export path fetches the bundle JS and jsRes.ok is false — the app at ref.path exists but was never deployed (draft-only), was deployed under a different workspace, or the fetch 404s because the compiled asset is missing.
Common situations: Editing a raw app locally and exporting to Hub without ever hitting Deploy; the app was undeployed or its deployment deleted; a stale reference pointing at an app path that no longer has a published version.
Related errors
- Couldn't fetch resource types from hub ${hubBaseUrl}: ${(awa
- Couldn't fetch resource types from public hub:
- ${text}
- export ${res.status}: ${text}
- await res.text()
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/ea24c3a566a43887.
Report an issue: GitHub.