-
Notifications
You must be signed in to change notification settings - Fork 432
Description
Note
Before you submit your issue, make sure that:
- You're using the latest version of Salesforce CLI.
- You've searched both open and closed issues for related posts.
- You've used the
doctorcommand to diagnose common issues.- You understand that GitHub Issues don't adhere to any agreement or SLA.
- If you require immediate assistance, use official channels such as Salesforce Customer Support.
Summary
Running the command sf project deploy preview cannot complete, as TypeInferenceError error is thrown.
The error refers to a file, which is not present in the repository.
Steps To Reproduce
Run the command sf project deploy preview in the terminal of a VS Code repository.
I cannot provide a repository, as I am working with customer data.
IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.
- Generate a project with
sf project generateor fork dreamhouse-lwc.- Provide detailed step-by-step instructions on how to reproduce the issue.
Tip
use sf doctor --create-issue to automatically fill the required information
Expected result
Able to successfully run the command
Actual result
Error thrown
PS C:\Users\ext-nto\Repositories\Salesforce> sf project deploy preview
Error (TypeInferenceError): Unexpected child metadata [force-app\main\default\objectTranslations\Account-en_US\annual_revenue_account.fieldTranslation-meta.xml] found for parent type [CustomObjectTranslation]
Additional information
Discovered from this thread on another issue.
#6778 (comment)
System Information
{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.119.8",
"nodeVersion": "node-v22.21.1",
"osVersion": "Windows_NT 10.0.26100",
"rootPath": "C:\\Users\\ext-nto\\AppData\\Local\\sf\\client\\2.119.8-524defa",
"shell": "powershell",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.39 (core)",
"@oclif/plugin-commands 4.1.38 (core)",
"@oclif/plugin-help 6.2.36 (core)",
"@oclif/plugin-not-found 3.2.73 (core)",
"@oclif/plugin-plugins 5.4.54 (core)",
"@oclif/plugin-search 1.2.36 (core)",
"@oclif/plugin-update 4.7.16 (core)",
"@oclif/plugin-version 2.2.36 (core)",
"@oclif/plugin-warn-if-update-available 3.1.53 (core)",
"@oclif/plugin-which 3.2.42 (core)",
"@salesforce/cli 2.119.8 (core)",
"agent 1.26.2 (core)",
"apex 3.9.5 (core)",
"api 1.3.7 (core)",
"auth 4.1.0 (core)",
"code-analyzer 5.8.0 (user) published 25 days ago (Mon Dec 29 2025)",
"data 4.0.67 (core)",
"deploy-retrieve 3.24.7 (core)",
"info 3.4.100 (core)",
"limits 3.3.74 (core)",
"marketplace 1.3.8 (core)",
"org 5.9.57 (core)",
"packaging 2.24.5 (core)",
"schema 3.3.90 (core)",
"settings 2.4.54 (core)",
"sobject 1.4.81 (core)",
"telemetry 3.6.71 (core)",
"templates 56.4.0 (core)",
"trust 3.7.113 (core)",
"user 3.6.45 (core)",
"sfdx-git-delta 6.28.0 (user) published 3 days ago (Mon Jan 19 2026)"
]
}