-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unable to load schema from '/Users/<user>/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/project-scratch-def.schema.json' #5840
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This would be owned by the VSCode extensions team. I will transfer it over. I am not seeing any other reports of this on their Issues repo so it could be a bad install? I would try fully uninstalling (and reinstalling) the VSCode extensions and the CLI. |
@dschach Please follow these steps
For Windows, run the following:
If you have two different versions for sfdx --version and sf --version, follow these instructions to uninstall the CLI from both the installer and NPM, then reinstall the latest version of the CLI using one of those methods. |
|
Hi I am experiencing the same issue with my setup. I have downgraded the package as was suggested on stackexchange but no change. Have tried using the expanded pack with the same result. which sfdx which sf sfdx --version sf --version |
@dschach @Telfie70 Can you try cleaning out all the existing and old versions of your Salesforce extensions in VSCode and then reinstalling the extensions? This is how to do that:
|
Hi @daphne-sfdc where sfdx where sf sfdx version |
@YavuzCemal Please go to your User settings.json and add |
@daphne-sfdc problem solved. ty. |
@YavuzCemal Great to hear your problem is now resolved! 🎊 @dschach @Telfie70 If cleaning and reinstalling your extensions doesn't work, please also try adding |
@daphne-sfdc Did all that. Deleted directory. Installed extended pack. Got an error that one of the extensions requires the regular pack. Installed the regular pack as well. Added json.schema to settings. It's asking for a folder called |
It's not a blocker, but it's there and I figured the team would like to know :) |
This issue has been linked to a new work item: W-16771336 |
Hello everyone, Multiple members of our team are seeing this warning, and we have concluded that it is a bug. We'll keep you updated on the status of fixing this bug in this issue. |
Hi @daphne-sfdc I have removed the files and then reinstalled and still got the error. I added "json.schemas": [] and still got the error Unable to load schema from '/Users/xxxx/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json': ENOENT: no such file or directory, open '/Users/xxxx/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json'. I was able to authorise the org so it might be ok functionality wise but will only find out for sure once I start getting into the details. |
This issue is not resolved with |
I have been able to resolve this by simply adding the I used the schemas from the official schemas repo - no clue if there is a more up-to-date version. ❗ Snippets written for Mac, but should be easy to adapt to Windows/Linux. Obviously, you need to copy the exact location that it is looking for - replace SFDX Project Schema wget https://raw.githubusercontent.com/forcedotcom/schemas/refs/heads/main/sfdx-project.schema.json && mv sfdx-project.schema.json /Users/Jannis.Schreiber/.vscode/extensions/salesforce.salesforcedx-vscode-core-62.3.1/node_modules/@salesforce/schemas/sfdx-project.schema.json Scratch Def Schema wget https://raw.githubusercontent.com/forcedotcom/schemas/refs/heads/main/project-scratch-def.schema.json && mv project-scratch-def.schema.json /Users/Jannis.Schreiber/.vscode/extensions/salesforce.salesforcedx-vscode-core-62.3.1/node_modules/@salesforce/schemas/project-scratch-def.schema.json ✅ Restart VS Code and you should be ready. Here's a screenshot with working auto-complete from the schema. |
@j-schreiber solution works although I assume it will have to be repeated each time the extension is updated. So weird that it's looking for these files in a directory that doesn't exist. |
@j-schreiber I went through this process and I am no longer getting the same error. But now I am getting an "Unable to parse content from (followed by the path)" error. Did you by any chance encounter this? |
Summary
Error shown when viewing scratch org definition file or sfdx-project.json in VSCode.
(Note: I cannot find the
/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce
folder on my MacOs computer. I found node_modules, but not @salesforce.)Steps To Reproduce
I can't show a repository because this is not repository-based.
It happens in multiple projects, for multiple files. There is an error that says
Unable to load schema from '/Users/dschach/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/project-scratch-def.schema.json': ENOENT: no such file or directory, open '/Users/dschach/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/project-scratch-def.schema.json'.
It also happens when I open sfdx-project.json:
Unable to load schema from '/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json': ENOENT: no such file or directory, open '/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json'.
Expected result
Actual result
Additional information
System Information
The text was updated successfully, but these errors were encountered: