hcengineering/platform · error
Account not found: ${name}
Error message
Account not found: ${name} What it means
findAccountByName resolves a member name to an AccountUuid via the accountsByName map populated when loading the target workspace's accounts. If the name has no matching account, the importer throws, because project/team/org space membership would otherwise reference a non-existent account.
Source
Thrown at packages/importer/src/huly/huly.ts:551
const socialId = await this.client.findOne(contact.class.SocialIdentity, {
type: SocialIdType.EMAIL,
value: email
})
if (socialId === undefined) {
throw new Error(`Social ID not found for email: ${email}`)
}
this.personIdByEmail.set(email, socialId._id)
return socialId._id
}
private findAccountByName (name: string): AccountUuid {
const account = this.accountsByName.get(name)
if (account === undefined) {
throw new Error(`Account not found: ${name}`)
}
return account
}
private findEmployeeByName (name: string): Ref<Employee> {
const employee = this.employeesByName.get(name)
if (employee === undefined) {
throw new Error(`Employee not found: ${name}`)
}
return employee
}
private async processDocumentsRecursively (
builder: ImportWorkspaceBuilder,
teamspacePath: string,
currentPath: string,
parentDocPath?: string
): Promise<void> {View on GitHub (pinned to 63e28dc964)
Solutions
- Ensure each named member exists as an account in the target workspace with the exact same display name
- Update member names in the space YAML to match existing accounts
- Remove stale members from the space config who no longer exist
- Re-export after the target workspace accounts are aligned with the source
Example fix
// before (space yaml) members: - Jane Smyth // after (matches an actual account) members: - Jane Smith
Defensive patterns
Strategy: validation
Validate before calling
const memberNames = [...new Set(spaceConfigs.flatMap(c => c.members ?? []))]
const missing = memberNames.filter(n => !accountNames.has(n))
if (missing.length) throw new Error(`Accounts missing in target workspace: ${missing.join(', ')}`) Try / catch
try {
await importer.workspaceData(folder)
} catch (e) {
if (e instanceof Error && e.message.startsWith('Account not found:')) {
const name = e.message.slice('Account not found:'.length).trim()
console.error(`Space member "${name}" does not exist in the target workspace`)
} else throw e
} Prevention
- Sync the target workspace accounts with the source before import
- Remove or remap members who left the organization in the space YAML
- Match display names exactly (no extra spaces, consistent casing)
- Re-export whenever membership changes
When it happens
Trigger: processProject, processTeamspace, or processOrgSpace resolves a member/owner name from a space's YAML settings; the name is absent from accountsByName (user missing from target workspace, renamed, or spelled differently).
Common situations: Space members exported from workspace A that do not exist in workspace B; renamed users; trailing spaces or case differences in names in the YAML config; removed/deactivated accounts still listed as members.
Related errors
- Unsupported card type: ${cardType} in ${cardPath}
- Invalid master tag data
- Invalid tag data
- Unsupported type: ${property.type} ${currentPath}
- Blob file not found: ${blobPath} from:${cardPath}
AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29).
Data as JSON: /api/errors/1005087352b9f341.
Report an issue: GitHub.